Project setup with webpack and PostCSS
This commit is contained in:
parent
88f03612b0
commit
624f30b03c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
|
2
css/skeleton.css
vendored
2
css/skeleton.css
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Skeleton V2.0.4
|
||||
* Skeleton V3.0.1 alpha
|
||||
* Copyright 2014, Dave Gamache
|
||||
* www.getskeleton.com
|
||||
* Free to use under the MIT license.
|
||||
|
14
package.json
Normal file
14
package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"postcss-loader": "^2.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"css-loader": "^0.28.5",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^0.11.2",
|
||||
"postcss": "^6.0.9",
|
||||
"postcss-cssnext": "^3.0.2",
|
||||
"postcss-import": "^10.0.0",
|
||||
"webpack": "^3.5.5"
|
||||
}
|
||||
}
|
8
postcss.config.js
Normal file
8
postcss.config.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
'postcss-import': {},
|
||||
'postcss-cssnext': {
|
||||
browsers: ['last 2 versions', '> 5%'],
|
||||
},
|
||||
},
|
||||
};
|
1
src/index.js
Normal file
1
src/index.js
Normal file
@ -0,0 +1 @@
|
||||
import styles from './main.css';
|
0
src/main.css
Normal file
0
src/main.css
Normal file
32
webpack.config.js
Normal file
32
webpack.config.js
Normal file
@ -0,0 +1,32 @@
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
entry: {
|
||||
app: './index.js',
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
use: [
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: { importLoaders: 1 },
|
||||
},
|
||||
'postcss-loader',
|
||||
],
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].bundle.js',
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin('skeleton.css'),
|
||||
],
|
||||
}
|
Loading…
Reference in New Issue
Block a user