mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-09 11:34:24 +08:00
Uglify js
This commit is contained in:
+24
-1
@@ -18,7 +18,29 @@ module.exports = (grunt) ->
|
||||
watch: {
|
||||
main: {
|
||||
files: '<%= var.source %>/**/*'
|
||||
tasks: ['default']
|
||||
tasks: ['default', 'qunit']
|
||||
}
|
||||
min: {
|
||||
files: [
|
||||
'<%= var.destination %>/scripts/**/*.js'
|
||||
'<%= var.destination %>/bower_components/**/*.js'
|
||||
]
|
||||
tasks: ['uglify']
|
||||
}
|
||||
}
|
||||
|
||||
uglify: {
|
||||
main: {
|
||||
files: {
|
||||
'build/min/scripts.js': [
|
||||
'build/bower_components/lodash/dist/lodash.js'
|
||||
'build/bower_components/angular/angular.js'
|
||||
'build/bower_components/angular-route/angular-route.js'
|
||||
'build/bower_components/angular-sanitize/angular-sanitize.js'
|
||||
'build/bower_components/marked/lib/marked.js'
|
||||
'build/scripts/**/*.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +94,7 @@ module.exports = (grunt) ->
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-coffee');
|
||||
grunt.loadNpmTasks('grunt-contrib-stylus');
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"grunt-cli": "0.1.x",
|
||||
"grunt-contrib-connect": "0.8.x",
|
||||
"grunt-contrib-watch": "0.6.x",
|
||||
"grunt-contrib-uglify": "0.6.x",
|
||||
"grunt-contrib-copy": "0.7.x",
|
||||
"grunt-contrib-coffee": "0.12.x",
|
||||
"grunt-contrib-stylus": "0.20.x",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
body(ng-controller="AppController")
|
||||
noscript Well, terribly sorry but you do need to have Javascript enabled.
|
||||
|
||||
// top menu
|
||||
.pure-menu.pure-menu-open.pure-menu-horizontal.menu-main
|
||||
ul
|
||||
li
|
||||
a(href="#{{base}}") Home
|
||||
li
|
||||
a(href="#{{base}}/pick") Pick
|
||||
li
|
||||
a(href="#") Help
|
||||
li
|
||||
a(href="#") About
|
||||
|
||||
div(ng-view class="cols-{{columns}}")
|
||||
@@ -3,7 +3,6 @@ script(src="bower_components/lodash/dist/lodash.js")
|
||||
script(src="bower_components/angular/angular.js")
|
||||
script(src="bower_components/angular-route/angular-route.js")
|
||||
script(src="bower_components/angular-sanitize/angular-sanitize.js")
|
||||
script(src="bower_components/angular-sanitize/angular-sanitize.js")
|
||||
script(src="bower_components/marked/lib/marked.js")
|
||||
script(src="scripts/app.js")
|
||||
script(src="scripts/services/fetch.js")
|
||||
@@ -0,0 +1,12 @@
|
||||
doctype html
|
||||
html(ng-app="sideBySide")
|
||||
head
|
||||
title Side By Side viewer
|
||||
meta(charset="utf-8")
|
||||
link(rel="stylesheet", type="text/css", href="//fonts.googleapis.com/css?family=Noticia+Text:400,700,400italic,700italic")
|
||||
link(rel="stylesheet", type="text/css", href="bower_components/fontawesome/css/font-awesome.min.css")
|
||||
link(rel="stylesheet", type="text/css", href="bower_components/pure/pure-min.css")
|
||||
link(rel="stylesheet", type="text/css", href="styles/style.css")
|
||||
script(src="min/scripts.js")
|
||||
|
||||
include includes/body.html.jade
|
||||
@@ -7,21 +7,6 @@ html(ng-app="sideBySide")
|
||||
link(rel="stylesheet", type="text/css", href="bower_components/fontawesome/css/font-awesome.min.css")
|
||||
link(rel="stylesheet", type="text/css", href="bower_components/pure/pure-min.css")
|
||||
link(rel="stylesheet", type="text/css", href="styles/style.css")
|
||||
include _scripts.html.jade
|
||||
include includes/scripts.html.jade
|
||||
|
||||
body(ng-controller="AppController")
|
||||
noscript Well, terribly sorry but you do need to have Javascript enabled.
|
||||
|
||||
// top menu
|
||||
.pure-menu.pure-menu-open.pure-menu-horizontal.menu-main
|
||||
ul
|
||||
li
|
||||
a(href="#{{base}}") Home
|
||||
li
|
||||
a(href="#{{base}}/pick") Pick
|
||||
li
|
||||
a(href="#") Help
|
||||
li
|
||||
a(href="#") About
|
||||
|
||||
div(ng-view class="cols-{{columns}}")
|
||||
include includes/body.html.jade
|
||||
|
||||
@@ -9,7 +9,7 @@ angular.module("sideBySide.controllers", [])
|
||||
|
||||
appUrl = $location.absUrl()
|
||||
.substring(0, $location.absUrl().length - $location.url().length)
|
||||
.replace(/#$/, '')
|
||||
.replace(/[^\/]*?#$/, '')
|
||||
|
||||
base = appUrl + $location.url()
|
||||
.slice(1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("sideBySide").factory("readerFactory", ($injector) ->
|
||||
angular.module("sideBySide").factory "readerFactory", ['$injector', ($injector) ->
|
||||
# Create poem reader based on file name
|
||||
#
|
||||
# @param [String] Source file name
|
||||
@@ -12,4 +12,4 @@ angular.module("sideBySide").factory("readerFactory", ($injector) ->
|
||||
return $injector.get("markdownReader")
|
||||
else
|
||||
throw "Unknown extension '" + extension + "'."
|
||||
)
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@ html
|
||||
title Side By Side test suite
|
||||
meta(charset="utf-8")
|
||||
|
||||
include _scripts.html.jade
|
||||
include includes/scripts.html.jade
|
||||
|
||||
// test scripts
|
||||
link(rel="stylesheet", type="text/css", href="bower_components/qunit/qunit/qunit.css")
|
||||
|
||||
Reference in New Issue
Block a user