Skip to content

Commit

Permalink
Merge pull request #434 from materializecss/release-2.0.3-beta
Browse files Browse the repository at this point in the history
Release 2.0.3 beta 🎃
  • Loading branch information
wuda-io authored Oct 31, 2023
2 parents e00ce02 + 95dd17c commit 68e5224
Show file tree
Hide file tree
Showing 195 changed files with 796 additions and 17,423 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ bin/

# Ignore lock
yarn.lock

# Compiled docs
/docs/*.html
!/docs/fab-toolbar-demo.html
123 changes: 14 additions & 109 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ module.exports = function(grunt) {
min: {
src: 'dist/css/materialize.min.css'
},
gh: {
src: 'docs/css/ghpages-materialize.css'
},
bin: {
src: 'bin/materialize.css'
}
Expand All @@ -117,9 +114,9 @@ module.exports = function(grunt) {

dev_watch: Object.assign({}, webpackConfig, {
mode: 'development',
watch: true,
watch: true
}),

dev_dist: Object.assign({}, webpackConfig, {
mode: 'development',
devtool: false,
Expand All @@ -129,8 +126,8 @@ module.exports = function(grunt) {
output: {
filename: 'materialize.js',
path: path.resolve(__dirname, 'dist/js'),
libraryTarget: 'umd',
globalObject: 'this'
libraryTarget: 'umd',
globalObject: 'this'
}
}),

Expand All @@ -146,24 +143,7 @@ module.exports = function(grunt) {
libraryTarget: 'umd',
globalObject: 'this'
}
}),
},

browserSync: {
bsFiles: ['bin/*', 'css/ghpages-materialize.css', '!**/node_modules/**/*'],
options: {
server: {
baseDir: './docs/' // make server from root dir
},
port: 8000,
ui: {
port: 8080,
weinre: {
port: 9090
}
},
open: false
}
})
},

compress: {
Expand All @@ -186,7 +166,7 @@ module.exports = function(grunt) {
files: [
{ expand: true, cwd: 'sass/', src: ['materialize.scss'], dest: 'materialize-src/sass/' },
{ expand: true, cwd: 'sass/', src: ['components/**/*'], dest: 'materialize-src/sass/' },
{ expand: true, cwd: 'src/', src: ['**/*'], dest: 'materialize-src/ts/' },
{ expand: true, cwd: 'src/', src: ['**/*'], dest: 'materialize-src/ts/' },
{ expand: true, cwd: 'dist/js/', src: ['**/*'], dest: 'materialize-src/js/bin/' },
{ expand: true, cwd: './', src: ['LICENSE', 'README.md'], dest: 'materialize-src/' }
]
Expand Down Expand Up @@ -249,43 +229,7 @@ module.exports = function(grunt) {
}
},

pug: {
compile: {
options: {
pretty: true,
data: {
debug: false
}
},
files: [{
expand: true,
cwd: 'pug/',
src: ['*.pug', '!**/pug/includes/*.*'],
dest: 'docs/',
rename: function (dest, src) {
return dest + src.split('.', 2)[0] + '.html';
}
}]
}
},

watch: {
pug: {
files: ['pug/**/*'],
tasks: ['pug_compile'],
options: {
interrupt: false,
spawn: false
}
},
copydocs: {
files: ['bin/*.js'],
tasks: ['copy:docs_js'],
options: {
interrupt: false,
spawn: false
}
},
sass: {
files: ['sass/**/*'],
tasks: ['sass_compile'],
Expand All @@ -302,22 +246,14 @@ module.exports = function(grunt) {
limit: 10
},
monitor: {
tasks: [
'webpack:dev_watch',
'pug_compile',
'sass_compile',
'watch:pug',
'watch:sass',
'watch:copydocs',
'server'
]
tasks: ['webpack:dev_watch', 'sass_compile', 'watch:sass']
}
},

// Replace text to update the version string
replace: {
version: {
src: ['bower.json', 'package.js', 'pug/**/*.html', 'pug/includes/_navbar.pug', 'src/global.ts'],
src: ['bower.json', 'package.js', 'src/global.ts'],
overwrite: true,
replacements: [
{
Expand All @@ -335,16 +271,6 @@ module.exports = function(grunt) {
to: '"version": "' + grunt.option('newver')
}
]
},
docs: {
src: ['.gitignore'],
overwrite: true,
replacements: [
{
from: '/docs/*.html',
to: ''
}
]
}
},

Expand Down Expand Up @@ -404,15 +330,6 @@ module.exports = function(grunt) {
}
}
}
},

copy: {
docs_js: {
files: [{ src: 'bin/materialize.js', dest: 'docs/js/materialize.js' }]
},
docs_templates: {
files: [{ src: 'templates/**', dest: 'docs/' }]
}
}
};

Expand All @@ -422,7 +339,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-pug');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-banner');
Expand All @@ -432,7 +348,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');

// define tasks
grunt.registerTask('release', [
Expand All @@ -451,15 +366,14 @@ module.exports = function(grunt) {
'replace:version', // again because of cdn
'replace:package_json',
'rename:rename_src',
'rename:rename_compiled',
]);
grunt.registerTask('pug_compile', ['pug']);
grunt.registerTask('js_compile', ['webpack:dev', 'copy:docs_js']);
grunt.registerTask('sass_compile', ['sass:gh', 'sass:bin', 'postcss:gh', 'postcss:bin']);
grunt.registerTask('server', ['browserSync']);
'rename:rename_compiled'
]);

grunt.registerTask('sass_compile', ['sass:gh', 'sass:bin', 'postcss:bin']);
grunt.registerTask('monitor', ['concurrent:monitor']); // DEV
grunt.registerTask('test', ['js_compile', 'sass_compile', 'connect', 'jasmine']);
grunt.registerTask('test', ['webpack:dev', 'sass_compile', 'connect', 'jasmine']);
grunt.registerTask('jas_test', ['connect', 'jasmine']);

grunt.registerTask('test_repeat', function() {
const tasks = ['connect'];
const n = 30;
Expand All @@ -468,13 +382,4 @@ module.exports = function(grunt) {
}
grunt.task.run(tasks);
});
grunt.registerTask('docs', [
'js_compile',
'copy:docs_js',
'copy:docs_templates',
'sass:gh',
'postcss:gh',
'pug',
'replace:docs'
]);
};
Loading

0 comments on commit 68e5224

Please sign in to comment.