Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Commit 57ce2b1

Browse files
committed
Add files
1 parent 35ca014 commit 57ce2b1

File tree

6 files changed

+98
-0
lines changed

6 files changed

+98
-0
lines changed

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env

border.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.greyBottom {
2+
border-bottom: 1px solid #C8C8C8;
3+
}

gulpfile.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const browserify = require('browserify');
2+
const cssModules = require('css-modulesify');
3+
const gulp = require('gulp');
4+
5+
gulp.task('default', () => {
6+
browserify({
7+
entries: './index.js',
8+
debug: true,
9+
})
10+
.plugin(cssModules, {
11+
output: './modules.css',
12+
})
13+
.bundle()
14+
.pipe(gulp.dest('./bundle.js'));
15+
});

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const styles = require('./style.css');
2+
3+
console.log(styles.normal);

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "css-modulesify-test",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "gulp"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"browserify": "^13.3.0",
13+
"css-modulesify": "css-modules/css-modulesify#fix-windows-abs-path",
14+
"gulp": "^3.9.1"
15+
}
16+
}

style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.normal {
2+
composes: greyBottom from './border.css';
3+
}

0 commit comments

Comments
 (0)