mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-02 21:04:13 +03:00
add scsslint to docs
This commit is contained in:
parent
6093b583d8
commit
2c5e945579
63
Gruntfile.js
63
Gruntfile.js
|
@ -70,6 +70,7 @@ module.exports = function (grunt) {
|
||||||
// Task configuration.
|
// Task configuration.
|
||||||
clean: {
|
clean: {
|
||||||
dist: 'dist',
|
dist: 'dist',
|
||||||
|
'dist-css': 'dist/css',
|
||||||
'dist-js': 'dist/js',
|
'dist-js': 'dist/js',
|
||||||
'docs-dist-js': 'docs/dist/js',
|
'docs-dist-js': 'docs/dist/js',
|
||||||
'docs-dist-css': 'docs/dist/css',
|
'docs-dist-css': 'docs/dist/css',
|
||||||
|
@ -166,7 +167,12 @@ module.exports = function (grunt) {
|
||||||
config: 'scss/.scss-lint.yml',
|
config: 'scss/.scss-lint.yml',
|
||||||
reporterOutput: null
|
reporterOutput: null
|
||||||
},
|
},
|
||||||
src: ['scss/**/*.scss', '!scss/_normalize.scss']
|
core: {
|
||||||
|
src: ['scss/*.scss', '!scss/_normalize.scss']
|
||||||
|
},
|
||||||
|
docs: {
|
||||||
|
src: ['docs/assets/scss/*.scss', '!scss/_normalize.scss', '!docs/assets/scss/docs.scss']
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
postcss: {
|
postcss: {
|
||||||
|
@ -271,7 +277,7 @@ module.exports = function (grunt) {
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: '../bootstrap/docs/_plugins',
|
cwd: '../bootstrap/docs/_plugins',
|
||||||
src: [
|
src: [
|
||||||
'**/*'
|
'**/*', '!bridge.rb'
|
||||||
],
|
],
|
||||||
dest: 'docs/_plugins/'
|
dest: 'docs/_plugins/'
|
||||||
},
|
},
|
||||||
|
@ -305,6 +311,24 @@ module.exports = function (grunt) {
|
||||||
],
|
],
|
||||||
dest: 'docs/components/'
|
dest: 'docs/components/'
|
||||||
},
|
},
|
||||||
|
'bs-docs-getting-started': {
|
||||||
|
options: {
|
||||||
|
// https://regex101.com/r/cZ7aO8/2
|
||||||
|
process: function (content, srcpath) {
|
||||||
|
return content
|
||||||
|
// insert docs reference
|
||||||
|
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice)
|
||||||
|
// remove sample text 'display' as this is a particular style and is confusing
|
||||||
|
.replace(/Fancy display heading/, 'Fancy heading');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
expand: true,
|
||||||
|
cwd: '../bootstrap/docs/getting-started',
|
||||||
|
src: [
|
||||||
|
'browsers-devices.md' // only one file
|
||||||
|
],
|
||||||
|
dest: 'docs/getting-started/'
|
||||||
|
},
|
||||||
'bs-docs-content': {
|
'bs-docs-content': {
|
||||||
options: {
|
options: {
|
||||||
// https://regex101.com/r/cZ7aO8/2
|
// https://regex101.com/r/cZ7aO8/2
|
||||||
|
@ -395,7 +419,7 @@ module.exports = function (grunt) {
|
||||||
//},
|
//},
|
||||||
docs: { // watch both the source and docs scss
|
docs: { // watch both the source and docs scss
|
||||||
files: ['docs/assets/scss/**/*.scss', 'scss/**/*.scss'],
|
files: ['docs/assets/scss/**/*.scss', 'scss/**/*.scss'],
|
||||||
tasks: ['scsslint', 'sass:docs', 'postcss:docs'] //FIXME: docs-css yanks sourcemap from local docs.css, working around just doing the minimal compile here ['docs-css'] //['dist-css', 'docs']
|
tasks: ['scsslint:docs', 'sass:docs', 'postcss:docs'] //FIXME: docs-css yanks sourcemap from local docs.css, working around just doing the minimal compile here ['docs-css'] //['dist-css', 'docs']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -538,7 +562,7 @@ module.exports = function (grunt) {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
grunt.registerTask('test-scss', ['scsslint']);
|
grunt.registerTask('test-scss', ['scsslint:core']);
|
||||||
|
|
||||||
// CSS distribution task.
|
// CSS distribution task.
|
||||||
// Supported Compilers: sass (Ruby) and libsass.
|
// Supported Compilers: sass (Ruby) and libsass.
|
||||||
|
@ -548,14 +572,31 @@ module.exports = function (grunt) {
|
||||||
// grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']);
|
// grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']);
|
||||||
grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']);
|
grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']);
|
||||||
|
|
||||||
grunt.registerTask('dist-css', ['sass-compile', 'postcss:core', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);
|
grunt.registerTask('dist-css', [
|
||||||
|
'scsslint:core',
|
||||||
|
'clean:dist-css',
|
||||||
|
'sass-compile',
|
||||||
|
'postcss:core',
|
||||||
|
'csscomb:dist',
|
||||||
|
'cssmin:core'
|
||||||
|
]);
|
||||||
|
|
||||||
|
grunt.registerTask('docs-css', [
|
||||||
|
'scsslint:docs',
|
||||||
|
'clean:docs-dist-css',
|
||||||
|
'sass:docs',
|
||||||
|
'postcss:docs',
|
||||||
|
'postcss:examples',
|
||||||
|
'csscomb:docs',
|
||||||
|
'csscomb:examples',
|
||||||
|
'cssmin:docs'
|
||||||
|
]);
|
||||||
|
|
||||||
// Full distribution task.
|
// Full distribution task.
|
||||||
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'docs']);
|
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'docs']);
|
||||||
|
|
||||||
// Default task.
|
// Default task.
|
||||||
grunt.registerTask('default', ['clean:dist', 'test']);
|
grunt.registerTask('default', ['clean:dist', 'test']);
|
||||||
|
|
||||||
//------
|
//------
|
||||||
// Docs tasks
|
// Docs tasks
|
||||||
|
|
||||||
|
@ -564,20 +605,12 @@ module.exports = function (grunt) {
|
||||||
grunt.registerTask('docs-copy-bootstrap-docs', [
|
grunt.registerTask('docs-copy-bootstrap-docs', [
|
||||||
'copy:bs-docs-js-vendor',
|
'copy:bs-docs-js-vendor',
|
||||||
'copy:bs-docs-scss',
|
'copy:bs-docs-scss',
|
||||||
|
'copy:bs-docs-getting-started',
|
||||||
'copy:bs-docs-components',
|
'copy:bs-docs-components',
|
||||||
'copy:bs-docs-content',
|
'copy:bs-docs-content',
|
||||||
'copy:bs-docs-examples',
|
'copy:bs-docs-examples',
|
||||||
'copy:bs-docs-plugins'
|
'copy:bs-docs-plugins'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('docs-css', [
|
|
||||||
'clean:docs-dist-css',
|
|
||||||
'sass:docs',
|
|
||||||
'postcss:docs',
|
|
||||||
'postcss:examples',
|
|
||||||
'csscomb:docs',
|
|
||||||
'csscomb:examples',
|
|
||||||
'cssmin:docs'
|
|
||||||
]);
|
|
||||||
|
|
||||||
grunt.registerTask('docs', ['docs-css', 'docs-js']);
|
grunt.registerTask('docs', ['docs-css', 'docs-js']);
|
||||||
//------
|
//------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015, Federico Zivolo
|
Copyright (c) 2015-2016, Federico Zivolo
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -24,7 +24,7 @@ SOFTWARE.
|
||||||
Acknowledgements:
|
Acknowledgements:
|
||||||
|
|
||||||
# Some original Bootstrap tooling code and documentation http://getbootstrap.com
|
# Some original Bootstrap tooling code and documentation http://getbootstrap.com
|
||||||
Copyright (c) 2011-2015 Twitter, Inc
|
Copyright (c) 2011-2016 Twitter, Inc
|
||||||
|
|
||||||
# Some original MDL code http://www.getmdl.io/
|
# Some original MDL code http://www.getmdl.io/
|
||||||
Copyright 2015 Google Inc. All Rights Reserved.
|
Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user