Skip to content

Commit

Permalink
docs(config): Add autoprefixing
Browse files Browse the repository at this point in the history
Add postcss-loader so that we can run autoprefixer
  • Loading branch information
ryanoglesby08 committed Oct 19, 2017
1 parent 4d48312 commit ba198f5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
9 changes: 8 additions & 1 deletion config/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,14 @@ module.exports = {
options: {
modules: true,
localIdentName: 'TDS_[name]__[local]___[hash:base64:5]',
importLoaders: 1, // Number of loaders applied before CSS loader
importLoaders: 2, // Number of loaders applied before CSS loader
},
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [require('autoprefixer')()],
},
},
'sass-loader',
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"license": "ISC",
"main": "dist/tds.cjs.js",
"module": "dist/tds.es.js",
"files": ["dist", "src", "CHANGELOG.md", "CONTRIBUTING.md", "UPGRADING.md"],
"files": [
"dist",
"src",
"CHANGELOG.md",
"CONTRIBUTING.md",
"UPGRADING.md"
],
"scripts": {
"build:css": "postcss --use cssnano --replace dist/tds.css",
"build:js": "rollup -c config/rollup.config.js",
Expand All @@ -15,8 +21,7 @@
"deploy:docs": "node ./scripts/deploy-docs.js",
"deploy:package": "scripts/publish.sh",
"dev": "styleguidist server --config config/styleguide.config.js",
"lint:js":
"eslint src config docs scripts --ext '.js,.jsx' --config config/.eslintrc.json --fix",
"lint:js": "eslint src config docs scripts --ext '.js,.jsx' --config config/.eslintrc.json --fix",
"lint:scss": "stylelint 'src/components/**/*.scss' --config config/.stylelintrc.json",
"lint:ec": "echint",
"lint": "yarn lint:js && yarn lint:scss && yarn lint:ec",
Expand Down Expand Up @@ -75,6 +80,7 @@
"node-sass": "^4.5.3",
"postcss": "^6.0.7",
"postcss-cli": "^4.1.0",
"postcss-loader": "^2.0.8",
"postcss-modules": "^0.8.0",
"prettier": "^1.7.4",
"react": "^16.0.0",
Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6033,7 +6033,7 @@ postcss-less@^1.1.0:
dependencies:
postcss "^5.2.16"

postcss-load-config@^1.1.0:
postcss-load-config@^1.1.0, postcss-load-config@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a"
dependencies:
Expand All @@ -6056,6 +6056,15 @@ postcss-load-plugins@^2.3.0:
cosmiconfig "^2.1.1"
object-assign "^4.1.0"

postcss-loader@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.8.tgz#8c67ddb029407dfafe684a406cfc16bad2ce0814"
dependencies:
loader-utils "^1.1.0"
postcss "^6.0.0"
postcss-load-config "^1.2.0"
schema-utils "^0.3.0"

postcss-media-query-parser@^0.2.0, postcss-media-query-parser@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244"
Expand Down

0 comments on commit ba198f5

Please sign in to comment.