Changed to Grunt.js for task running
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
1536c0721d
commit
6455f3ff10
@ -3,6 +3,7 @@ pipeline:
|
||||
image: node:18
|
||||
commands:
|
||||
- npm install
|
||||
- npm run grunt
|
||||
|
||||
lint:
|
||||
image: node:18
|
||||
|
53
Gruntfile.js
53
Gruntfile.js
@ -4,6 +4,51 @@ module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
sass: {
|
||||
dist: {
|
||||
options: {
|
||||
style: 'compressed'
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'assets/styles',
|
||||
src: ['**/*.scss'],
|
||||
dest: 'public/css',
|
||||
ext: '.css'
|
||||
}]
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: false
|
||||
},
|
||||
compile: {
|
||||
files: {
|
||||
'public/js/nechryael.min.js': ['assets/js/**/*.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
css: {
|
||||
files: ['assets/styles/**/*.scss'],
|
||||
tasks: ['sass'],
|
||||
options: {
|
||||
atBegin: true,
|
||||
spawn: false
|
||||
}
|
||||
},
|
||||
js: {
|
||||
files: ['assets/js/**/*.js'],
|
||||
tasks: ['uglify'],
|
||||
options: {
|
||||
atBegin: true,
|
||||
spawn: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
deb_package: {
|
||||
options: {
|
||||
maintainer: 'Gregory Ballantine <gballantine@bitgoblin.tech>',
|
||||
@ -75,10 +120,14 @@ module.exports = function(grunt) {
|
||||
}
|
||||
});
|
||||
|
||||
// Load the plugin that provides the "uglify" task.
|
||||
// Load plugins.
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-deb');
|
||||
|
||||
// Default task(s).
|
||||
// CLI tasks.
|
||||
grunt.registerTask('default', ['sass', 'uglify']);
|
||||
grunt.registerTask('package', ['deb_package']);
|
||||
|
||||
};
|
||||
|
3
assets/js/nechryael.js
Normal file
3
assets/js/nechryael.js
Normal file
@ -0,0 +1,3 @@
|
||||
$(document).ready(function() {
|
||||
console.log('Document is ready!');
|
||||
});
|
17
gulpfile.js
17
gulpfile.js
@ -1,17 +0,0 @@
|
||||
const gulp = require('gulp');
|
||||
const { watch } = require('gulp');
|
||||
const sass = require('gulp-sass')(require('sass'));
|
||||
|
||||
// compile
|
||||
function styles(cb) {
|
||||
return gulp.src('./assets/styles/**/*.scss')
|
||||
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
|
||||
.pipe(gulp.dest('./public/css'));
|
||||
cb();
|
||||
}
|
||||
|
||||
// by default, watch files
|
||||
exports.default = function() {
|
||||
// compile sass stylesheets
|
||||
watch('assets/styles/**/*.scss', styles);
|
||||
};
|
6853
package-lock.json
generated
6853
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,6 @@
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
"grunt": "grunt",
|
||||
"gulp": "gulp",
|
||||
"nodemon": "nodemon index.js",
|
||||
"lint": "eslint index.js src/**/*.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
@ -32,9 +31,10 @@
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"grunt": "^1.5.3",
|
||||
"grunt-cli": "^1.4.3",
|
||||
"grunt-contrib-sass": "^2.0.0",
|
||||
"grunt-contrib-uglify": "^5.2.2",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-deb": "^0.2.5",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"nodemon": "^2.0.20",
|
||||
"sass": "^1.55.0"
|
||||
},
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
|
||||
<link rel="stylesheet" href="/css/gargoyle.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
<script src="/js/drake.js"></script>
|
||||
<script src="/js/nechryael.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- global navigation -->
|
||||
|
Loading…
Reference in New Issue
Block a user