Commit ba0c95f6 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

bower

parent 9b51bd40
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "echo",
"isShellCommand": true,
"args": ["Hello World"],
"showOutput": "never"
}
\ No newline at end of file
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
sourceMap: true,
sourceMapName: 'dist/<%= pkg.name %>.map'
},
build: {
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
}
},
concat: {
js: {
src: 'src/*.js',
dest: 'dist/<%= pkg.name %>.js'
},
css: {
src: 'src/*.css',
dest: 'dist/<%= pkg.name %>.css'
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'dist/<%= pkg.name %>.min.css': 'dist/<%= pkg.name %>.css'
}
}
},
wiredep: {
task: {
includeSelf: true,
src: ['demo/index.html'],
overrides : {
"uikit": {
"main" : [
"js/uikit.js", "js/components/notify.min.js", "js/components/datepicker.min.js", "js/components/accordion.min.js",
"css/uikit.almost-flat.min.css", "css/components/notify.almost-flat.min.css", "css/components/datepicker.almost-flat.min.css", "css/components/accordion.almost-flat.min.css"
]
},
"ion.rangeSlider": {
"main" : ["js/ion.rangeSlider.min.js", "css/ion.rangeSlider.css", "css/ion.rangeSlider.skinNice.css" ]
},
"jquery-file-upload": {
"main" : ["js/vendor/jquery.ui.widget.js", "js/jquery.iframe-transport.js", "js/jquery.fileupload.js" ]
},
"DataTables" : {
"main" : ["media/js/jquery.dataTables.min.js", "media/js/dataTables.uikit.min.js", "media/css/jquery.dataTables.min.css", "media/css/dataTables.uikit.min.css"]
},
"jquery.inputmask" : {
"main" : "dist/jquery.inputmask.bundle.js"
}
}
}
},
bower_concat: {
all: {
dest: {
'js': 'build/src/lib.min.js',
'css': 'build/src/lib.min.css'
},
bowerOptions: {
relative: false
},
mainFiles: {
'leaflet': ['dist/leaflet-src.js', 'dist/leaflet.css'],
'leaflet.draw': ['dist/leaflet.draw-src.js', 'dist/leaflet.draw.css'],
'jquery.inputmask': 'dist/jquery.inputmask.bundle.js',
'DataTables': ['media/js/jquery.dataTables.min.js', 'media/js/dataTables.uikit.min.js', 'media/css/jquery.dataTables.min.css', 'media/css/dataTables.uikit.min.css'],
'datatables.net-select': 'js/dataTables.select.min.js',
'uikit': [
'js/uikit.js', 'js/components/notify.min.js', 'js/components/datepicker.min.js', 'js/components/accordion.min.js',
'css/uikit.almost-flat.min.css', 'css/components/notify.almost-flat.min.css','css/components/datepicker.almost-flat.min.css', 'css/components/accordion.almost-flat.min.css'
],
'jquery-file-upload': ['js/vendor/jquery.ui.widget.js', 'js/jquery.iframe-transport.js','js/jquery.fileupload.js' ],
'blueimp-canvas-to-blob' : 'js/canvas-to-blob.min.js',
'blueimp-load-image' : 'js/load-image.all.min.js',
'blueimp-tmpl' : 'js/tmpl.min.js',
'ion.rangeSlider': ['js/ion.rangeSlider.min.js', 'css/ion.rangeSlider.css', 'css/ion.rangeSlider.skinNice.css'],
},
dependencies: {
'leaflet.draw': 'leaflet',
'DataTables': 'jquery',
'datatables.net-select': 'DataTables',
'uikit': 'jquery',
'jquery-file-upload': 'jquery',
'leaflet-coordinates-control': ['jquery','leaflet','leaflet.draw', 'leaflet-container-control']
}
}
},
copy: {
dist: {
files: [
{
expand: true,
flatten: true,
src: ['dist/<%= pkg.name %>.js', 'dist/<%= pkg.name %>.css'],
dest: 'build/src'
},
{
expand: true,
flatten: true,
src: ['package/index.html', 'package/server.js'],
dest: 'build/'
},
{
expand: true,
flatten: true,
src: 'bower_components/**/images/*',
dest: 'build/images/'
},
{
expand: true,
flatten: true,
src: 'bower_components/**/img/*',
dest: 'build/img/'
},
{
expand: true,
flatten: true,
src: 'bower_components/**/fonts/*',
dest: 'build/fonts/'
}]
}
},
clean: 'build'
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-bower-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-wiredep');
grunt.registerTask('default', ['concat', 'uglify', 'cssmin']);
grunt.registerTask('production', ['clean', 'bower_concat', 'copy']);
};
......@@ -8,15 +8,18 @@
"description": "TimeDimension layer for displaying L.TileLayers with time dimension. Syncs with leaflet-player-control",
"main": [
"src/L.TimeDimension.layer.wms.picasso.js"
],
],
"repository": {
"type": "git",
"url": "git@git.smhi.se:stw/L.TimeDimension.layer.weather.git"
},
"dependencies": {
"leaflet": "https://github.com/Leaflet/Leaflet.git#v1.0.0-beta.2",
"leaflet-timedimension" : "https://github.com/socib/Leaflet.TimeDimension.git#v1.0.2"
"leaflet": "https://github.com/Leaflet/Leaflet.git#v1.0.0-rc.1",
"leaflet-timedimension" : "https://github.com/socib/Leaflet.TimeDimension.git#v1.0.2"
},
"resolutions": {
"leaflet": "v1.0.0-rc.1"
},
"devDependencies": {},
"license": "MIT",
"ignore": [
......
{
"name": "leaflet-stw-risk-control",
"description": "Used for demo folder and creating dist folder",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "4.x",
"multer": "^1.2.0",
"path": "latest",
"request": "latest",
"moment": "latest",
"moment-precise-range-plugin": "latest",
"body-parser": "latest",
"dateformat": "latest",
"fs": "latest"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-bower-concat": "^1.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-uglify": "^2.0.0",
"grunt-wiredep": "^3.0.1"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment