Added Grunt.js config to project for SASS stylesheets and CoffeeScript
This commit is contained in:
parent
bdc316ba9e
commit
e611f6e26a
6
.gitignore
vendored
6
.gitignore
vendored
@ -56,3 +56,9 @@ build-iPhoneSimulator/
|
|||||||
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
||||||
# .rubocop-https?--*
|
# .rubocop-https?--*
|
||||||
|
|
||||||
|
# Ignore Grunt.js dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Ignore compiled CSS and JS
|
||||||
|
public/css/
|
||||||
|
public/js/
|
||||||
|
Binary file not shown.
65
Gruntfile.js
Normal file
65
Gruntfile.js
Normal 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']);
|
||||||
|
|
||||||
|
};
|
3
assets/coffee/meiyerditch.coffee
Normal file
3
assets/coffee/meiyerditch.coffee
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$(document).ready(->
|
||||||
|
console.log('JS is ready')
|
||||||
|
)
|
2
assets/sass/darkmeyer.sass
Normal file
2
assets/sass/darkmeyer.sass
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
body
|
||||||
|
background: lightgrey
|
2892
package-lock.json
generated
Normal file
2892
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
package.json
Normal file
27
package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
2
public/styles/darkmeyer.css
Normal file
2
public/styles/darkmeyer.css
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
body{background:#d3d3d3}
|
||||||
|
/*# sourceMappingURL=darkmeyer.css.map */
|
7
public/styles/darkmeyer.css.map
Normal file
7
public/styles/darkmeyer.css.map
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAAA,IAAI,CACF,UAAU,CAAE,OAAS",
|
||||||
|
"sources": ["../../assets/sass/darkmeyer.sass"],
|
||||||
|
"names": [],
|
||||||
|
"file": "darkmeyer.css"
|
||||||
|
}
|
@ -6,6 +6,9 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title><%= title %> | Webdap</title>
|
<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="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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main-wrapper" class="container">
|
<div id="main-wrapper" class="container">
|
||||||
|
Loading…
Reference in New Issue
Block a user