chore: components workflow

This commit is contained in:
Mo
2022-06-15 10:11:05 -05:00
parent f076057f4b
commit f33e5db84e
34 changed files with 74 additions and 74 deletions

View File

@@ -11,18 +11,28 @@ on:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/components
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install dependencies
run: yarn install
- name: ESLint
run: yarn lint
- name: Lint components
run: yarn components:lint
- name: Compile components
run: yarn compile:components
- name: Build
run: yarn components:compile
- name: Test components
run: yarn components:test
- name: Lint all
run: yarn lint
- name: Build all
run: yarn build:all
- name: Test
- name: Test all
run: yarn test

View File

@@ -33,7 +33,7 @@ jobs:
run: yarn install
- name: Compile Components
run: yarn compile:components
run: yarn components:clean && yarn components:compile
- name: Commit Components
run: |
node packages/components/scripts/package-components.mjs

View File

@@ -19,7 +19,6 @@
"build:desktop": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/desktop run build",
"build:mobile": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/mobile run build",
"build:web-server": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/web-server run build",
"compile:components": "yarn workspace @standardnotes/components-meta run compile",
"start:server:web": "lerna run start --scope=@standardnotes/web-server",
"start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
"prepare": "husky install",

View File

@@ -22,14 +22,14 @@
"deploy-build": "yarn run predeploy && gh-pages -b build -d build",
"deploy-dev": "yarn run predeploy && gh-pages -b dev -d build",
"deploy-stable": "yarn run predeploy && gh-pages -b gh-pages -d build",
"custom:test": "react-scripts test --watchAll=false",
"components:test": "react-scripts test --watchAll=false",
"test:coverage": "npm run test -- --coverage --watchAll",
"eject": "react-scripts eject",
"serve": "serve -s -p 3000 build",
"server-public": "http-server -p 3000 --cors",
"server-root": "http-server ./ -p 3000 --cors",
"server": "http-server ./build -p 3000 --cors",
"compile:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
"components:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
},
"eslintConfig": {
"extends": [

View File

@@ -12,8 +12,8 @@
"scripts": {
"start": "webpack serve --config webpack.dev.js --progress --hot",
"compile": "webpack --config webpack.prod.js",
"custom:lint": "eslint src --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint src --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"devDependencies": {
"@babel/cli": "^7.13.10",

View File

@@ -4,8 +4,8 @@
"version": "1.3.5",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix",
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix",
"compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot"
},

View File

@@ -9,8 +9,8 @@
"scripts": {
"start": "http-server . --cors -p8001 & webpack --progress --config webpack.dev.js",
"compile": "webpack --config webpack.prod.js",
"custom:lint": "eslint src --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint src --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"devDependencies": {
"@babel/cli": "^7.12.10",

View File

@@ -17,7 +17,7 @@
"start": "react-scripts start",
"compile": "react-scripts build",
"eject": "react-scripts eject",
"compile:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
"components:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
},
"devDependencies": {
"@codemirror/lang-markdown": "^0.19.6",

View File

@@ -6,7 +6,7 @@
"main": "dist/dist.js",
"author": "Standard Notes <hello@standardnotes.com>",
"scripts": {
"custom:lint": "eslint --ext .js .",
"components:lint": "eslint --ext .js .",
"compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot"
},

View File

@@ -4,7 +4,7 @@
"version": "1.4.2",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint --cache --ext .jsx,.js --format=node_modules/eslint-formatter-pretty .",
"components:lint": "eslint --cache --ext .jsx,.js --format=node_modules/eslint-formatter-pretty .",
"compile": "webpack",
"start": "webpack-dev-server --devtool eval --progress --port 8001 --hot --content-base app",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"

View File

@@ -6,8 +6,8 @@
"scripts": {
"compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"sn": {
"main": "dist/index.html"

View File

@@ -4,8 +4,8 @@
"version": "1.4.4",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "npm run lint -- --fix",
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "npm run lint -- --fix",
"compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"

View File

@@ -5,8 +5,8 @@
"scripts": {
"compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"sn": {
"main": "dist/index.html"

View File

@@ -9,9 +9,10 @@
]
},
"scripts": {
"compile": "yarn compile:lint && yarn compile:all",
"compile:lint": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run lint",
"compile:all": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run compile"
"components:clean": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:clean",
"components:lint": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:lint",
"components:test": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:test",
"components:compile": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:compile"
},
"devDependencies": {
"@standardnotes/deterministic-zip": "^1.2.0",

View File

@@ -15,21 +15,21 @@
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "react-app-rewired start",
"compile": "react-app-rewired build",
"prepublishOnly": "npm run build",
"clean-deploy-cache": "rm -rf node_modules/.cache/gh-pages",
"predeploy": "yarn run pretty && yarn run build && yarn clean-deploy-cache",
"deploy-build": "yarn run predeploy && gh-pages -b build -d build",
"deploy-dev": "yarn run predeploy && gh-pages -b dev -d build",
"deploy-stable": "yarn run predeploy && gh-pages -b gh-pages -d build",
"custom:test": "react-app-rewired test --watchAll=false",
"test:coverage": "npm run test -- --coverage --watchAll",
"eject": "react-scripts eject",
"serve": "serve -s -p 3000 build",
"server-public": "http-server -p 3000 --cors",
"server-root": "http-server ./ -p 3000 --cors",
"server": "http-server ./build -p 3000 --cors",
"compile:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
"components:compile": "react-app-rewired build",
"components:test": "react-app-rewired test --watchAll=false",
"components:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
},
"eslintConfig": {
"extends": [

View File

@@ -11,9 +11,9 @@
},
"scripts": {
"start": "webpack serve --config webpack.dev.js --progress --hot",
"compile": "webpack --config webpack.prod.js",
"custom:lint": "eslint src --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:compile": "webpack --config webpack.prod.js",
"components:lint": "eslint src --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"devDependencies": {
"@babel/cli": "^7.13.10",

View File

@@ -4,9 +4,9 @@
"version": "1.3.5",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix",
"compile": "webpack --config webpack.prod.js",
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix",
"components:compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot"
},
"sn": {

View File

@@ -8,9 +8,10 @@
"license": "AGPL-3.0",
"scripts": {
"start": "http-server . --cors -p8001 & webpack --progress --config webpack.dev.js",
"compile": "webpack --config webpack.prod.js",
"custom:lint": "eslint src --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:compile": "webpack --config webpack.prod.js",
"components:lint": "eslint src --ext .js",
"components:lint:fix": "yarn lint --fix",
"components:clean": "rm -rf ./vendor"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
@@ -23,7 +24,6 @@
"eslint": "*",
"http-server": "^0.12.3",
"mini-css-extract-plugin": "^1.3.5",
"remove-files-webpack-plugin": "^1.4.4",
"sass": "*",
"sass-loader": "^10.1.1",
"sn-stylekit": "^2.1.1",

View File

@@ -1,7 +1,6 @@
const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const RemovePlugin = require('remove-files-webpack-plugin')
module.exports = {
entry: [path.resolve(__dirname, 'src', 'main.js'), path.resolve(__dirname, 'src', 'main.scss')],
@@ -49,14 +48,5 @@ module.exports = {
filename: '[name].css',
chunkFilename: '[id].css',
}),
new RemovePlugin({
/**
* Before compilation, remove existing `./vendor` folder.
* It will be re-created later by the CopyPlugin.
*/
before: {
include: ['./vendor'],
},
}),
],
}

View File

@@ -5,7 +5,7 @@
"description": "",
"main": "index.js",
"scripts": {
"compile": "grunt"
"components:compile": "grunt"
},
"author": "Standard Notes",
"devDependencies": {

View File

@@ -15,9 +15,9 @@
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "react-app-rewired start",
"compile": "react-app-rewired build",
"components:compile": "react-app-rewired build",
"eject": "react-scripts eject",
"compile:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
"components:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
},
"devDependencies": {
"@codemirror/lang-markdown": "^0.19.6",

View File

@@ -6,7 +6,7 @@
"main": "dist/dist.js",
"author": "Standard Notes <hello@standardnotes.org>",
"scripts": {
"compile": "grunt"
"components:compile": "grunt"
},
"devDependencies": {
"@babel/core": "^7.11.1",

View File

@@ -6,8 +6,8 @@
"main": "dist/dist.js",
"author": "Standard Notes <hello@standardnotes.com>",
"scripts": {
"custom:lint": "eslint --ext .js .",
"compile": "webpack --config webpack.prod.js",
"components:lint": "eslint --ext .js .",
"components:compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot"
},
"sn": {

View File

@@ -4,8 +4,8 @@
"version": "1.4.2",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint --cache --ext .jsx,.js --format=node_modules/eslint-formatter-pretty .",
"compile": "webpack",
"components:lint": "eslint --cache --ext .jsx,.js --format=node_modules/eslint-formatter-pretty .",
"components:compile": "webpack",
"start": "webpack-dev-server --devtool eval --progress --port 8001 --hot --content-base app",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},

View File

@@ -4,10 +4,10 @@
"version": "1.3.10",
"main": "dist/dist.js",
"scripts": {
"compile": "webpack --config webpack.prod.js",
"components:compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"sn": {
"main": "dist/index.html"

View File

@@ -4,9 +4,9 @@
"version": "1.4.4",
"main": "dist/dist.js",
"scripts": {
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "npm run lint -- --fix",
"compile": "webpack --config webpack.prod.js",
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "npm run lint -- --fix",
"components:compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -7,6 +7,6 @@
"main": "dist/dist.css"
},
"scripts": {
"compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
"components:compile": "webpack --entry ./src/main.scss --config ./../../theme.webpack.config.js"
}
}

View File

@@ -3,10 +3,10 @@
"version": "2.0.10",
"main": "dist/dist.js",
"scripts": {
"compile": "webpack --config webpack.prod.js",
"components:compile": "webpack --config webpack.prod.js",
"start": "webpack serve --config webpack.dev.js --progress --hot",
"custom:lint": "eslint app/ --ext .js",
"custom:lint:fix": "yarn lint --fix"
"components:lint": "eslint app/ --ext .js",
"components:lint:fix": "yarn lint --fix"
},
"sn": {
"main": "dist/index.html"