Skip to content

Commit

Permalink
Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
francisbesset committed Mar 24, 2017
1 parent c100f12 commit 76df7fc
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules/
node_modules/
examples/*/public/
12 changes: 12 additions & 0 deletions examples/extract-css/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
font-awesome-sass-loader extract-css example
============================================

```bash
# install deps
npm install

# Run on dev server
npm run dev

# Run on prod server
npm run dist
19 changes: 19 additions & 0 deletions examples/extract-css/font-awesome.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
styleLoader: require('extract-text-webpack-plugin').extract('style-loader', 'css-loader!sass-loader'),

styles: {
"mixins": true,

"path": true,
"core": true,
"larger": true,
"fixed-width": true,
"list": true,
"bordered-pulled": true,
"animated": true,
"rotated-flipped": true,
"stacked": true,
"icons": true,
"screen-reader": true,
},
};
21 changes: 21 additions & 0 deletions examples/extract-css/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"private": true,
"scripts": {
"clean": "rm -rf public/",
"dev": "webpack -d",
"dist": "webpack -p"
},
"dependencies": {
"css-loader": "*",
"style-loader": "*",
"extract-text-webpack-plugin": "^1",
"file-loader": "*",
"font-awesome": "^4.6.0",
"font-awesome-sass-loader": "^1.0",
"node-gyp": "*",
"node-sass": "*",
"sass-loader": "*",
"url-loader": "*",
"webpack": "^1"
}
}
21 changes: 21 additions & 0 deletions examples/extract-css/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
entry: {
'font-awesome': 'font-awesome-sass!./font-awesome.config.js',
},
output: {
path: './public/assets',
publicPath: '/assets/',
filename: '[name].js',
},
module: {
loaders: [
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader' },
],
},
plugins: [
new ExtractTextPlugin("[name].css"),
],
};

0 comments on commit 76df7fc

Please sign in to comment.