Added Grunt.js config to project for SASS stylesheets and CoffeeScript

This commit is contained in:
Gregory Ballantine 2022-12-10 14:56:09 -05:00
parent bdc316ba9e
commit e611f6e26a
10 changed files with 3007 additions and 0 deletions

6
.gitignore vendored
View File

@ -56,3 +56,9 @@ build-iPhoneSimulator/
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*
# Ignore Grunt.js dependencies
node_modules/
# Ignore compiled CSS and JS
public/css/
public/js/

65
Gruntfile.js Normal file
View File

@ -0,0 +1,65 @@
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json')
// Project configuration.
grunt.initConfig({
sass: {
dist: {
options: {
style: 'compressed'
},
files: [{
expand: true,
cwd: 'assets/sass',
src: ['*.sass'],
dest: 'public/styles',
ext: '.css'
}]
}
},
coffee: {
options: {
sourceMap: true,
style: 'compressed'
},
files: {
expand: true,
flatten: true,
cwd: 'assets/coffee',
src: ['*.coffee'],
dest: 'public/js',
ext: '.js'
}
},
watch: {
css: {
files: ['assets/sass/*.sass'],
tasks: ['sass'],
options: {
atBegin: true,
spawn: false
}
},
js: {
files: ['assets/coffee/*.coffee'],
tasks: ['coffee'],
options: {
atBegin: true,
spawn: false
}
}
}
});
// Load task plugins
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['sass', 'coffee']);
};

View File

@ -0,0 +1,3 @@
$(document).ready(->
console.log('JS is ready')
)

View File

@ -0,0 +1,2 @@
body
background: lightgrey

2892
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

27
package.json Normal file
View File

@ -0,0 +1,27 @@
{
"name": "webdap",
"version": "1.0.0",
"description": "Open source LDAP user and group manager",
"main": "index.js",
"scripts": {
"grunt": "grunt",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.metaunix.net/Metaunix/webdap"
},
"keywords": [
"ldap",
"users",
"groups"
],
"author": "Gregory Ballantine <gballantine@bitgoblin.tech>",
"license": "BSD-2-Clause",
"devDependencies": {
"grunt": "^1.5.3",
"grunt-contrib-coffee": "^2.1.0",
"grunt-contrib-sass": "^2.0.0",
"grunt-contrib-watch": "^1.1.0"
}
}

View File

@ -0,0 +1,2 @@
body{background:#d3d3d3}
/*# sourceMappingURL=darkmeyer.css.map */

View File

@ -0,0 +1,7 @@
{
"version": 3,
"mappings": "AAAA,IAAI,CACF,UAAU,CAAE,OAAS",
"sources": ["../../assets/sass/darkmeyer.sass"],
"names": [],
"file": "darkmeyer.css"
}

View File

@ -6,6 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %> | Webdap</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<link rel="stylesheet" href="/styles/darkmeyer.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="/js/meiyerditch.js"></script>
</head>
<body>
<div id="main-wrapper" class="container">