Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

Commit 1baf351

Browse files
committedJul 19, 2016
Merge branch 'cathylill-presets-instructions' into version-0.3.6
2 parents 155f662 + 91fb03a commit 1baf351

File tree

4 files changed

+60
-199
lines changed

4 files changed

+60
-199
lines changed
 

‎README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,21 @@ As of `babel@6.0` you must specify your
8989
[`presets`](http://babeljs.io/docs/plugins/#presets) to get this to work with
9090
`React`.
9191

92-
See [Quick guide: how to update Babel 5.x ->
93-
6.x](https://medium.com/@malyw/how-to-update-babel-5-x-6-x-d828c230ec53#.3z99fxfmq)
94-
for more details.
92+
Presets can be specified as part of a [Babel
93+
config](https://babeljs.io/docs/usage/babelrc/) as outlined in [Setting up Babel
94+
6](https://babeljs.io/blog/2015/10/31/setting-up-babel-6), or you may specify
95+
Babel presets for your loader within your webpack configuration:
96+
97+
~~~js
98+
// file: webpack.config.js
99+
module.exports = {
100+
101+
loaders: [
102+
{ test: /\.svg$/, loader: 'babel?presets[]=es2015,presets[]=react!svg-react' }
103+
],
104+
105+
}
106+
~~~
95107

96108

97109
### React Before Version 0.14.0

‎gulpfile.js

-28
This file was deleted.

‎package.json

+45-52
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,47 @@
11
{
2-
"name": "svg-react-loader",
3-
"fullname": "SVG to React Loader",
4-
"description": "A Webpack Loader to turn SVGs into React Components",
5-
"version": "0.3.5",
6-
"keywords": [
7-
"webpack",
8-
"loader",
9-
"react",
10-
"svg",
11-
"component",
12-
"jsx"
13-
],
14-
"main": "./index.js",
15-
"dependencies": {
16-
"xml2js": "^0.4",
17-
"lodash": "^4.12.0",
18-
"loader-utils": "^0.2"
19-
},
20-
"devDependencies": {
21-
"react": "^0.14",
22-
"react-dom": "^0.14",
23-
"babel-core": "^6.0",
24-
"babel-loader": "^6.0",
25-
"babel-preset-es2015": "^6.3",
26-
"babel-preset-react": "^6.3",
27-
"webpack": "^1.0",
28-
"webpack-dev-server": "^1.0",
29-
"mocha": "^2.0",
30-
"should": "^7.0",
31-
"del": "^2.2",
32-
"gulp": "^3.0",
33-
"gulp-util": "^3.0",
34-
"gulp-ejs": "^1.2",
35-
"gulp-concat": "^2.0"
36-
},
37-
"scripts": {
38-
"build": "./node_modules/.bin/gulp",
39-
"clobber": "./node_modules/.bin/gulp clobber",
40-
"test": "./node_modules/.bin/mocha -R spec test/test-*.js"
41-
},
42-
"license": "MIT",
43-
"repository": {
44-
"type": "git",
45-
"url": "http://github.com/jhamlet/svg-react-loader.git"
46-
},
47-
"bugs": {
48-
"url": "http://github.com/jhamlet/svg-react-loader/issues"
49-
},
50-
"contributors": [
51-
"Jerry Hamlet <jerry@hamletink.com> (http://hamletink.com)",
52-
"Jonathan Ong <me@jongleberry.com> (http://twitter.com/jongleberry)"
53-
]
2+
"name": "svg-react-loader",
3+
"fullname": "SVG to React Loader",
4+
"description": "A Webpack Loader to turn SVGs into React Components",
5+
"version": "0.3.6",
6+
"keywords": [
7+
"webpack",
8+
"loader",
9+
"react",
10+
"svg",
11+
"component",
12+
"jsx"
13+
],
14+
"main": "./index.js",
15+
"dependencies": {
16+
"xml2js": "^0.4",
17+
"lodash": "^4.12.0",
18+
"loader-utils": "^0.2"
19+
},
20+
"devDependencies": {
21+
"react": "^0.14",
22+
"react-dom": "^0.14",
23+
"babel-core": "^6.0",
24+
"babel-loader": "^6.0",
25+
"babel-preset-es2015": "^6.3",
26+
"babel-preset-react": "^6.3",
27+
"webpack": "^1.0",
28+
"webpack-dev-server": "^1.0",
29+
"mocha": "^2.0",
30+
"should": "^7.0"
31+
},
32+
"scripts": {
33+
"test": "./node_modules/.bin/mocha -R spec test/test-*.js"
34+
},
35+
"license": "MIT",
36+
"repository": {
37+
"type": "git",
38+
"url": "http://github.com/jhamlet/svg-react-loader.git"
39+
},
40+
"bugs": {
41+
"url": "http://github.com/jhamlet/svg-react-loader/issues"
42+
},
43+
"contributors": [
44+
"Jerry Hamlet <jerry@hamletink.com> (http://hamletink.com)",
45+
"Jonathan Ong <me@jongleberry.com> (http://twitter.com/jongleberry)"
46+
]
5447
}

‎tmpl/readme.ejs

-116
This file was deleted.

0 commit comments

Comments
 (0)
Failed to load comments.