Skip to content

Commit

Permalink
Update dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Dec 13, 2022
1 parent 9920dfe commit e207c24
Show file tree
Hide file tree
Showing 8 changed files with 5,477 additions and 6,870 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
name: Test
on:
push:
branches:
- main
pull_request:
env:
FORCE_COLOR: 2
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 15
- name: Install all dependencies
uses: bahmutov/npm-install@v1
node-version: 19
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run tests
run: yarn test
run: pnpm test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
yarn-error.log

cache/
9 changes: 5 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
let { existsSync, createWriteStream, remove, mkdirp } = require('fs-extra')
let { existsSync, createWriteStream } = require('fs')
let { join, dirname } = require('path')
let { rm, mkdir } = require('fs/promises')
let { get } = require('https')
let gulp = require('gulp')

// Benchmark

gulp.task('clean', done => {
remove(join(__dirname, 'cache'), done)
gulp.task('clean', async () => {
await rm(join(__dirname, 'cache'), { recursive: true, force: true })
})

gulp.task('bootstrap', async () => {
let cache = join(__dirname, 'cache', 'bootstrap.css')
await mkdirp(dirname(cache))
await mkdir(dirname(cache), { recursive: true })
if (existsSync(cache)) return
await new Promise((resolve, reject) => {
let file = createWriteStream(cache)
Expand Down
75 changes: 30 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,74 +4,59 @@
"test": "eslint . && gulp"
},
"dependencies": {
"autoprefixer": "^10.0.4",
"css-tree": "^1.0.0-alpha14",
"cssom": "^0.4.4",
"fs-extra": "^9.0.1",
"autoprefixer": "^10.4.13",
"css-tree": "^2.3.0",
"cssom": "^0.5.0",
"gonzales": "^1.0.7",
"gonzales-pe": "^4.3.0",
"gulp": "^4.0.2",
"gulp-bench": "^1.1.0",
"gulp-bench-summary": "^0.1.0",
"less": "^3.12.2",
"less": "^4.1.3",
"mensch": "^0.3.4",
"myth": "^1.5.0",
"node-sass": "^7.0.0",
"node-sass": "^8.0.0",
"parserlib": "^1.1.1",
"postcss": "^8.2.13",
"postcss-mixins": "^7.0.1",
"postcss-nested": "^5.0.2",
"postcss-selector-parser": "^6.0.4",
"postcss-simple-vars": "^6.0.1",
"postcss-value-parser": "^4.1.0",
"postcss": "^8.4.20",
"postcss-mixins": "^9.0.4",
"postcss-nested": "^6.0.0",
"postcss-selector-parser": "^6.0.11",
"postcss-simple-vars": "^7.0.1",
"postcss-value-parser": "^4.2.0",
"rework": "^1.0.1",
"sass": "^1.29.0",
"sass": "^1.56.2",
"stylecow-core": "^2.5.0",
"stylecow-plugin-calc": "^2.0.0",
"stylecow-plugin-nested-rules": "^5.0.1",
"stylecow-plugin-prefixes": "^6.0.5",
"stylecow-plugin-variables": "^5.1.4",
"stylis": "^4.0.6",
"stylis": "^4.1.3",
"through2": "^4.0.2"
},
"devDependencies": {
"@logux/eslint-config": "^42.3.0",
"@logux/sharec-config": "^0.8.5",
"eslint": "^7.14.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-es5": "^1.5.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prefer-let": "^1.1.0",
"eslint-plugin-prettierx": "^0.14.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-unicorn": "^23.0.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.2"
"@logux/eslint-config": "^48.0.0",
"eslint": "^8.29.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1"
},
"engines": {
"node": ">=10.0.0"
"node": ">=14.0.0"
},
"prettier": {
"arrowParens": "avoid",
"jsxSingleQuote": false,
"quoteProps": "consistent",
"semi": false,
"singleQuote": true,
"trailingComma": "none"
},
"eslintConfig": {
"extends": "@logux/eslint-config",
"rules": {
"security/detect-non-literal-require": "off",
"no-unused-expressions": "off",
"node/global-require": "off"
"n/global-require": "off"
}
},
"lint-staged": {
"*.js": "eslint --fix"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"sharec": {
"config": "@logux/sharec-config",
"version": "0.8.5"
}
}
7 changes: 0 additions & 7 deletions parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Gonzales PE: 82 ms (5.2 times slower)
*/

let { readFileSync, existsSync } = require('fs')
let gonzalesPe = require('gonzales-pe')
let postcssSP = require('postcss-selector-parser')
let postcssVP = require('postcss-value-parser')
let parserlib = require('parserlib')
Expand Down Expand Up @@ -83,12 +82,6 @@ module.exports = {
gonzales.csspToSrc(gonzales.srcToCSSP(css))
}
},
{
name: 'Gonzales PE',
fn: () => {
gonzalesPe.parse(css).toString()
}
},
{
name: 'CSSTree',
fn: () => {
Expand Down
Loading

0 comments on commit e207c24

Please sign in to comment.