Skip to content

Commit

Permalink
Merge c5fbbea into 32fac40
Browse files Browse the repository at this point in the history
  • Loading branch information
pbredenberg committed Apr 28, 2022
2 parents 32fac40 + c5fbbea commit e9641cc
Show file tree
Hide file tree
Showing 6 changed files with 752 additions and 419 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ node_modules
coverage
.nyc_output
dist
.idea
1 change: 1 addition & 0 deletions .stylelintrc.yml
@@ -0,0 +1 @@
extends: ./node_modules/@silvermine/standardization/.stylelintrc.yml
6 changes: 4 additions & 2 deletions .travis.yml
@@ -1,6 +1,8 @@
language: node_js
node_js:
- "node" # Latest node version
# TODO: Re-enable when Travis CI fixes image dependency problems
# See: https://github.com/silvermine/standardization/issues/39
# - "node" # Latest node version
- "lts/*" # Latest LTS version
- "14"
- "12"
Expand All @@ -9,7 +11,7 @@ before_install: npm i -g npm@6.14.12

script:
- npm run commitlint
- grunt standards
- npm run standards
- npm test

# For code coverage:
Expand Down
30 changes: 1 addition & 29 deletions Gruntfile.js
Expand Up @@ -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');

Expand Down Expand Up @@ -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' ],
Expand All @@ -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' ]);
Expand Down

0 comments on commit e9641cc

Please sign in to comment.