mirror of
https://gitea.invidious.io/iv-org/videojs-quality-selector.git
synced 2024-08-15 00:43:13 +00:00
chore: add @silvermine/standardization and configuration
This commit is contained in:
parent
cc87e2ca27
commit
e2b3735a9c
5 changed files with 1119 additions and 414 deletions
1
.stylelintrc.yml
Normal file
1
.stylelintrc.yml
Normal file
|
@ -0,0 +1 @@
|
|||
extends: ./node_modules/@silvermine/standardization/.stylelintrc.yml
|
|
@ -9,7 +9,7 @@ before_install: npm i -g npm@6.14.12
|
|||
|
||||
script:
|
||||
- npm run commitlint
|
||||
- grunt standards
|
||||
- npm run standards
|
||||
- npm test
|
||||
|
||||
# For code coverage:
|
||||
|
|
30
Gruntfile.js
30
Gruntfile.js
|
@ -6,8 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
var path = require('path'),
|
||||
getCodeVersion = require('silvermine-serverless-utils/src/get-code-version'),
|
||||
markdownlint = require('markdownlint');
|
||||
getCodeVersion = require('silvermine-serverless-utils/src/get-code-version');
|
||||
|
||||
const sass = require('sass');
|
||||
|
||||
|
@ -110,17 +109,6 @@ module.exports = function(grunt) {
|
|||
dist: config.dist.base,
|
||||
},
|
||||
|
||||
eslint: {
|
||||
target: config.js.all,
|
||||
},
|
||||
|
||||
stylelint: {
|
||||
options: {
|
||||
configFile: path.join(__dirname, 'node_modules', '@silvermine', 'standardization', '.stylelintrc.yml'),
|
||||
},
|
||||
src: config.sass.all,
|
||||
},
|
||||
|
||||
watch: {
|
||||
grunt: {
|
||||
files: [ 'Gruntfile.js' ],
|
||||
|
@ -137,31 +125,15 @@ module.exports = function(grunt) {
|
|||
tasks: [ 'build-css' ],
|
||||
},
|
||||
},
|
||||
|
||||
markdownlint: {
|
||||
all: {
|
||||
// Adjust `src` depending on how many files need to be linted:
|
||||
src: [ 'README.md' ],
|
||||
options: {
|
||||
// eslint-disable-next-line no-sync
|
||||
config: markdownlint.readConfigSync('.markdownlint.json'),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
grunt.loadNpmTasks('grunt-eslint');
|
||||
grunt.loadNpmTasks('grunt-postcss');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-sass');
|
||||
grunt.loadNpmTasks('grunt-stylelint');
|
||||
grunt.loadNpmTasks('grunt-markdownlint');
|
||||
|
||||
grunt.registerTask('standards', [ 'eslint', 'stylelint', 'markdownlint' ]);
|
||||
grunt.registerTask('build-js', [ 'browserify', 'uglify' ]);
|
||||
grunt.registerTask('build-css', [ 'sass', 'postcss' ]);
|
||||
grunt.registerTask('build', [ 'build-js', 'build-css' ]);
|
||||
|
|
1485
package-lock.json
generated
1485
package-lock.json
generated
File diff suppressed because it is too large
Load diff
15
package.json
15
package.json
|
@ -5,8 +5,15 @@
|
|||
"main": "src/js/index.js",
|
||||
"scripts": {
|
||||
"prepare": "grunt build",
|
||||
"test": "check-node-version --npm 6.14.12 && nyc mocha -- 'tests/**/*.test.js'",
|
||||
"commitlint": "commitlint --from ad805e8"
|
||||
"test": "check-node-version --npm 8.5.5 && nyc mocha -- 'tests/**/*.test.js'",
|
||||
"commitlint": "commitlint --from ad805e8",
|
||||
"markdownlint": "markdownlint -c .markdownlint.json -i CHANGELOG.md '{,!(node_modules)/**/}*.md'",
|
||||
"eslint": "eslint '{,!(node_modules|dist)/**/}*.js'",
|
||||
"stylelint": "stylelint './src/scss/**/*.scss'",
|
||||
"standards": "npm run markdownlint && npm run stylelint && npm run eslint",
|
||||
"release:preview": "node ./node_modules/@silvermine/standardization/scripts/release.js preview",
|
||||
"release:prep-changelog": "node ./node_modules/@silvermine/standardization/scripts/release.js prep-changelog",
|
||||
"release:finalize": "node ./node_modules/@silvermine/standardization/scripts/release.js finalize"
|
||||
},
|
||||
"author": "Jeremy Thomerson",
|
||||
"license": "MIT",
|
||||
|
@ -27,9 +34,8 @@
|
|||
"homepage": "https://github.com/silvermine/videojs-quality-selector#readme",
|
||||
"devDependencies": {
|
||||
"@silvermine/eslint-config": "3.0.1",
|
||||
"@silvermine/standardization": "1.2.0",
|
||||
"@silvermine/standardization": "2.0.0",
|
||||
"autoprefixer": "8.6.5",
|
||||
"check-node-version": "4.0.3",
|
||||
"coveralls": "3.0.3",
|
||||
"eslint": "6.8.0",
|
||||
"expect.js": "0.3.1",
|
||||
|
@ -38,7 +44,6 @@
|
|||
"grunt-contrib-clean": "2.0.0",
|
||||
"grunt-contrib-uglify": "4.0.1",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-eslint": "22.0.0",
|
||||
"grunt-postcss": "0.9.0",
|
||||
"grunt-sass": "3.0.2",
|
||||
"mocha": "8.4.0",
|
||||
|
|
Loading…
Reference in a new issue