diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 9f7427f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_style = tab -indent_size = 2 -insert_final_newline = true -tab_width = 4 -trim_trailing_whitespace = true -block_comment_start = /* -block_comment = * -block_comment_end = */ - -[*.{cmd,bat}] -end_of_line = crlf - -[{package.json,*.yml}] -indent_style = space diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index bb860b5..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "parserOptions": { - "sourceType": "script", - "impliedStrict": false - }, - "env": { - "es6": true, - "node": true - }, - "extends": [ - "standard" - ], - "root": true, - "rules": { - "comma-dangle": [ - "error", - { - "arrays": "always-multiline", - "objects": "always-multiline", - "imports": "always-multiline", - "exports": "always-multiline", - "functions": "never" - } - ], - "indent": [ - "error", - "tab", - { - "SwitchCase": 1 - } - ], - "no-tabs": [ - "off" - ], - "no-var": [ - "error" - ], - "prefer-arrow-callback": [ - "error" - ], - "prefer-const": [ - "error" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always", - { - "omitLastInOneLineBlock": false - } - ], - "strict": [ - "error", - "safe" - ] - }, - "overrides": [ - { - "files": [ - "test/**/*" - ], - "env": { - "mocha": true - }, - "rules": { - "no-template-curly-in-string": "off" - } - } - ] -} diff --git a/.travis.yml b/.travis.yml index f860632..655452a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ language: node_js node_js: - stable - - 4 + +script: + - nyc mocha --no-timeouts after_script: - - npm run report-coverage + - codecov diff --git a/LICENSE b/LICENSE index 44c6e33..d9c0f45 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 刘祺 +Copyright (c) 2018 刘祺 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index f9fe534..9499273 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,13 @@ First thing's first, install the module: npm install postcss-syntax postcss-html --save-dev ``` +If you want support SCSS/SASS/LESS/SugarSS syntax, you need to install the corresponding module. + +- SCSS: [postcss-scss](https://github.com/postcss/postcss-scss) +- SASS: [postcss-sass](https://github.com/aleshaoleg/postcss-sass) +- LESS: [postcss-less](https://github.com/shellscape/postcss-less) +- SugarSS: [sugarss](https://github.com/postcss/sugarss) + ## Use Cases ```js diff --git a/lib/extract.js b/extract.js similarity index 100% rename from lib/extract.js rename to extract.js diff --git a/lib/index.js b/index.js similarity index 55% rename from lib/index.js rename to index.js index 66e429d..4ce58ab 100644 --- a/lib/index.js +++ b/index.js @@ -1,5 +1,5 @@ "use strict"; const extract = require("./extract"); -const syntax = require("postcss-syntax/lib/syntax")(extract); +const syntax = require("postcss-syntax/syntax")(extract); module.exports = syntax; diff --git a/package.json b/package.json index 8f2ffbb..f1bcb6a 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,7 @@ { "name": "postcss-html", - "version": "0.22.0", + "version": "0.23.1", "description": "PostCSS syntax for parsing HTML (and HTML-like)", - "main": "lib/index.js", - "scripts": { - "report-coverage": "codecov", - "pretest": "eslint lib test", - "test": "nyc mocha --no-timeouts" - }, - "nyc": { - "lines": 100, - "statements": 100, - "functions": 100, - "branches": 100, - "reporter": [ - "lcov", - "text" - ], - "all": true, - "cache": true, - "check-coverage": true - }, "repository": { "type": "git", "url": "git+https://github.com/gucong3000/postcss-html.git" @@ -45,29 +26,35 @@ "url": "https://github.com/gucong3000/postcss-html/issues" }, "homepage": "https://github.com/gucong3000/postcss-html#readme", + "nyc": { + "reporter": [ + "lcov", + "text" + ], + "all": true, + "cache": true, + "check-coverage": true + }, + "scripts": { + "test": "nyc mocha --no-timeouts" + }, "dependencies": { "htmlparser2": "^3.9.2" }, "peerDependencies": { "postcss": ">=5.0.0", - "postcss-syntax": "*" + "postcss-syntax": ">=0.3.0" }, "devDependencies": { "autoprefixer": "^8.3.0", "chai": "^4.1.2", "codecov": "^3.0.1", - "eslint": "^4.19.1", - "eslint-config-standard": "^11.0.0", - "eslint-plugin-import": "^2.11.0", - "eslint-plugin-node": "^6.0.1", - "eslint-plugin-promise": "^3.7.0", - "eslint-plugin-standard": "^3.1.0", "mocha": "^5.1.1", "nyc": "^11.7.1", "postcss": "^6.0.21", "postcss-less": "^1.1.5", "postcss-scss": "^1.0.5", - "postcss-syntax": "github:gucong3000/postcss-syntax#HEAD", + "postcss-syntax": "^0.3.0", "sugarss": "^1.0.1" } }