Skip to content

Commit 6925e54

Browse files
committed
Initial port
0 parents  commit 6925e54

14 files changed

+615
-0
lines changed

.babelrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"targets": {
7+
"browsers": ["last 2 versions", "ie >= 9", "safari >= 7"],
8+
"node": "0.12.7"
9+
},
10+
"modules": "commonjs"
11+
}
12+
],
13+
"react"
14+
],
15+
"plugins": [
16+
"add-module-exports",
17+
"transform-es2015-modules-commonjs",
18+
"transform-object-rest-spread",
19+
"transform-class-properties"
20+
]
21+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
coverage/

jest-setup.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { configure } from 'enzyme';
2+
import Adapter from 'enzyme-adapter-react-16';
3+
4+
configure({ adapter: new Adapter() });

package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "@mintuz/react-css-loader",
3+
"version": "1.0.0",
4+
"main": "dist/index.js",
5+
"description": "A React HOC that provides functionality for rendering CSS per component",
6+
"homepage": "http://github.com/mintuz/react-css-loader/tree/master",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/mintuz/react-css-loader.git"
10+
},
11+
"bugs": {
12+
"url": "https://github.com/mintuz/react-css-loader/issues"
13+
},
14+
"scripts": {
15+
"prettier": "prettier --arrow-parens=always --single-quote --tab-width=4 --print-width=80 \"./src/**/*.js\" \"./test/**/*js\" --write",
16+
"babel": "babel src --out-dir dist --ignore '**/*.test.js'",
17+
"test": "npm run prettier && jest --coverage --no-cache",
18+
"build": "npm run prettier && npm run babel",
19+
"jest": "jest --watch"
20+
},
21+
"jest": {
22+
"testPathIgnorePatterns": [
23+
".node_modules/"
24+
],
25+
"setupFiles": [
26+
"./jest-setup.js"
27+
]
28+
},
29+
"author": "Adam Bulmer",
30+
"dependencies": {
31+
"bluebird": "^3.5.1",
32+
"react": "^16.4.1",
33+
"react-dom": "^16.4.1",
34+
"react-tree-walker": "^4.1.0"
35+
},
36+
"devDependencies": {
37+
"babel-cli": "^6.26.0",
38+
"babel-core": "^6.9.1",
39+
"babel-jest": "^20.0.3",
40+
"babel-plugin-add-module-exports": "^0.2.1",
41+
"babel-plugin-transform-class-properties": "^6.24.1",
42+
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.4",
43+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
44+
"babel-preset-env": "^1.6.1",
45+
"babel-preset-react": "^6.5.0",
46+
"enzyme": "^3.3.0",
47+
"enzyme-adapter-react-16": "^1.1.1",
48+
"jest": "^20.0.4",
49+
"prettier": "^1.10.2"
50+
}
51+
}

src/__test__/MyComponent.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.mock-class { background: red; }

src/__test__/MyComponent2.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.mock-class-two { background: red; }

src/__test__/UserDefinedStyles.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.defined { background: red; }

0 commit comments

Comments
 (0)