mirror of
https://github.com/iv-org/videojs-quality-selector.git
synced 2025-04-28 03:06:09 -04:00
chore: add @silvermine/standardization and configuration
This commit is contained in:
parent
cc87e2ca27
commit
e2b3735a9c
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:
|
script:
|
||||||
- npm run commitlint
|
- npm run commitlint
|
||||||
- grunt standards
|
- npm run standards
|
||||||
- npm test
|
- npm test
|
||||||
|
|
||||||
# For code coverage:
|
# For code coverage:
|
||||||
|
30
Gruntfile.js
30
Gruntfile.js
@ -6,8 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
getCodeVersion = require('silvermine-serverless-utils/src/get-code-version'),
|
getCodeVersion = require('silvermine-serverless-utils/src/get-code-version');
|
||||||
markdownlint = require('markdownlint');
|
|
||||||
|
|
||||||
const sass = require('sass');
|
const sass = require('sass');
|
||||||
|
|
||||||
@ -110,17 +109,6 @@ module.exports = function(grunt) {
|
|||||||
dist: config.dist.base,
|
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: {
|
watch: {
|
||||||
grunt: {
|
grunt: {
|
||||||
files: [ 'Gruntfile.js' ],
|
files: [ 'Gruntfile.js' ],
|
||||||
@ -137,31 +125,15 @@ module.exports = function(grunt) {
|
|||||||
tasks: [ 'build-css' ],
|
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-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-browserify');
|
grunt.loadNpmTasks('grunt-browserify');
|
||||||
grunt.loadNpmTasks('grunt-eslint');
|
|
||||||
grunt.loadNpmTasks('grunt-postcss');
|
grunt.loadNpmTasks('grunt-postcss');
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
grunt.loadNpmTasks('grunt-sass');
|
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-js', [ 'browserify', 'uglify' ]);
|
||||||
grunt.registerTask('build-css', [ 'sass', 'postcss' ]);
|
grunt.registerTask('build-css', [ 'sass', 'postcss' ]);
|
||||||
grunt.registerTask('build', [ 'build-js', 'build-css' ]);
|
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",
|
"main": "src/js/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "grunt build",
|
"prepare": "grunt build",
|
||||||
"test": "check-node-version --npm 6.14.12 && nyc mocha -- 'tests/**/*.test.js'",
|
"test": "check-node-version --npm 8.5.5 && nyc mocha -- 'tests/**/*.test.js'",
|
||||||
"commitlint": "commitlint --from ad805e8"
|
"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",
|
"author": "Jeremy Thomerson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -27,9 +34,8 @@
|
|||||||
"homepage": "https://github.com/silvermine/videojs-quality-selector#readme",
|
"homepage": "https://github.com/silvermine/videojs-quality-selector#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@silvermine/eslint-config": "3.0.1",
|
"@silvermine/eslint-config": "3.0.1",
|
||||||
"@silvermine/standardization": "1.2.0",
|
"@silvermine/standardization": "2.0.0",
|
||||||
"autoprefixer": "8.6.5",
|
"autoprefixer": "8.6.5",
|
||||||
"check-node-version": "4.0.3",
|
|
||||||
"coveralls": "3.0.3",
|
"coveralls": "3.0.3",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"expect.js": "0.3.1",
|
"expect.js": "0.3.1",
|
||||||
@ -38,7 +44,6 @@
|
|||||||
"grunt-contrib-clean": "2.0.0",
|
"grunt-contrib-clean": "2.0.0",
|
||||||
"grunt-contrib-uglify": "4.0.1",
|
"grunt-contrib-uglify": "4.0.1",
|
||||||
"grunt-contrib-watch": "1.1.0",
|
"grunt-contrib-watch": "1.1.0",
|
||||||
"grunt-eslint": "22.0.0",
|
|
||||||
"grunt-postcss": "0.9.0",
|
"grunt-postcss": "0.9.0",
|
||||||
"grunt-sass": "3.0.2",
|
"grunt-sass": "3.0.2",
|
||||||
"mocha": "8.4.0",
|
"mocha": "8.4.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user