Skip to content

Commit 871ff65

Browse files
author
Myles Shannon
committed
Initial commit
QuickJot derivative
1 parent 08b1d13 commit 871ff65

21 files changed

+723
-47
lines changed

.gitignore

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,6 @@
1-
# Windows image file caches
2-
Thumbs.db
3-
ehthumbs.db
4-
5-
# Folder config file
6-
Desktop.ini
7-
8-
# Recycle Bin used on file shares
9-
$RECYCLE.BIN/
10-
11-
# Windows Installer files
12-
*.cab
13-
*.msi
14-
*.msm
15-
*.msp
16-
17-
# Windows shortcuts
18-
*.lnk
19-
20-
# =========================
21-
# Operating System Files
22-
# =========================
23-
24-
# OSX
25-
# =========================
26-
27-
.DS_Store
28-
.AppleDouble
29-
.LSOverride
30-
31-
# Thumbnails
32-
._*
33-
34-
# Files that might appear in the root of a volume
35-
.DocumentRevisions-V100
36-
.fseventsd
37-
.Spotlight-V100
38-
.TemporaryItems
39-
.Trashes
40-
.VolumeIcon.icns
41-
42-
# Directories potentially created on remote AFP share
43-
.AppleDB
44-
.AppleDesktop
45-
Network Trash Folder
46-
Temporary Items
47-
.apdisk
1+
node_modules
2+
bower_components
3+
.sass-cache
4+
.tmp
5+
dist
6+
*.db

Gruntfile.js

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
module.exports = function(grunt) {
2+
var rewrite = require('connect-modrewrite');
3+
4+
// server config
5+
var livereloadPort = 3500;
6+
var hostPort = 8080;
7+
var hostAddress = 'localhost';
8+
9+
grunt.initConfig({
10+
pkg: grunt.file.readJSON('package.json'),
11+
connect: {
12+
front: {
13+
options: {
14+
port: hostPort,
15+
hostname: hostAddress,
16+
livereload: livereloadPort,
17+
open: true,
18+
base: './dist/',
19+
middleware: function(connect, options, middlewares) {
20+
var rules = [
21+
'!\\.html|\\.woff|\\.eot|\\.ttf|\\.js|\\.css|\\.svg|\\.jp(e?)g|\\.png|\\.gif$ /index.html'
22+
];
23+
middlewares.unshift(rewrite(rules));
24+
middlewares.unshift(require('connect-livereload')());
25+
return middlewares;
26+
}
27+
}
28+
}
29+
},
30+
less: {
31+
options: {
32+
style: 'compact',
33+
sourcemap: 'none'
34+
},
35+
front: {
36+
src: './src/styles.less',
37+
dest: './dist/styles.min.css'
38+
}
39+
},
40+
copy: {
41+
front: {
42+
files: [
43+
{expand: true, cwd: './src/', src: 'analytics.js', dest: './dist/'},
44+
{expand: true, cwd: './src/', src: 'robots.txt', dest: './dist/'},
45+
{expand: true, cwd: './src/views/', src: '*.html', dest: './dist/views'},
46+
{expand: true, cwd: './src/assets/', src: '**', dest: './dist/assets'}
47+
]
48+
}
49+
},
50+
ngAnnotate: {
51+
options: {
52+
singleQuotes: true
53+
},
54+
front: {
55+
src: './src/app/*.js',
56+
dest: '.tmp/app.js'
57+
},
58+
},
59+
uglify: {
60+
options: {
61+
report: 'min',
62+
soureMap: true,
63+
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
64+
},
65+
front: {
66+
src: '.tmp/app.js',
67+
dest: './dist/app.min.js'
68+
}
69+
},
70+
htmlbuild: {
71+
dev: {
72+
src: './src/index.html',
73+
dest: '.tmp/index.html',
74+
options: {
75+
scripts: {
76+
analytics: []
77+
}
78+
}
79+
},
80+
prod: {
81+
src: './src/index.html',
82+
dest: '.tmp/index.html',
83+
options: {
84+
beautify: true,
85+
relative: false,
86+
scripts: {
87+
'analytics': {cwd: '', files: ['analytics.js']}
88+
}
89+
}
90+
}
91+
},
92+
htmlmin: {
93+
front: {
94+
options: {
95+
collapseWhitespace: true,
96+
conservativeCollapse: true,
97+
collapseBooleanAttributes: true,
98+
removeCommentsFromCDATA: true,
99+
removeComments: true
100+
},
101+
files: [
102+
{expand: true, cwd: './src/app/views/', src: '**/*.html', dest: './dist/views/'},
103+
{'./dist/index.html': '.tmp/index.html'}
104+
]
105+
}
106+
},
107+
bower: {
108+
front: {
109+
options: {
110+
install: false,
111+
layout: "byComponent",
112+
targetDir: './dist/libs/'
113+
}
114+
}
115+
},
116+
jshint: {
117+
front: {
118+
options: {
119+
reporter: require('jshint-stylish'),
120+
curly: true,
121+
eqeqeq: true,
122+
eqnull: true,
123+
browser: true,
124+
globals: {
125+
jQuery: true
126+
},
127+
},
128+
files: {
129+
src: ['Gruntfile.js', './src/app/*.js']
130+
}
131+
}
132+
},
133+
watch: {
134+
front: {
135+
tasks: ['build:front:dev'],
136+
options: {
137+
livereload: livereloadPort
138+
},
139+
files: ['./src/**']
140+
}
141+
},
142+
clean: {
143+
folder: '.tmp/',
144+
cache: '.sass-cache/'
145+
}
146+
});
147+
148+
grunt.loadNpmTasks('grunt-contrib-uglify');
149+
grunt.loadNpmTasks('grunt-contrib-jshint');
150+
grunt.loadNpmTasks('grunt-html-build');
151+
grunt.loadNpmTasks('grunt-contrib-watch');
152+
grunt.loadNpmTasks('grunt-contrib-htmlmin');
153+
grunt.loadNpmTasks('grunt-contrib-copy');
154+
grunt.loadNpmTasks('grunt-contrib-connect');
155+
grunt.loadNpmTasks('grunt-bower-task');
156+
grunt.loadNpmTasks('grunt-contrib-clean');
157+
grunt.loadNpmTasks('grunt-ng-annotate');
158+
grunt.loadNpmTasks('grunt-contrib-less');
159+
grunt.loadNpmTasks('grunt-composer');
160+
161+
grunt.registerTask('default', ['build:front:dev']);
162+
163+
grunt.registerTask('test', ['jshint:front']);
164+
165+
grunt.registerTask('serve', ['build:front', 'connect:front', 'watch:front:dev']);
166+
167+
grunt.registerTask('prod', ['build:front:prod']);
168+
169+
grunt.registerTask('build', function(tar, arg) {
170+
if(tar === undefined) {
171+
tar = 'front';
172+
}
173+
if(arg === undefined) {
174+
arg = 'dev'; // build target dev if not otherwise specified
175+
}
176+
grunt.task.run([
177+
'copy:front',
178+
'bower:front',
179+
'less:front',
180+
'ngAnnotate:front',
181+
'uglify:front',
182+
'htmlbuild:'+arg,
183+
'htmlmin:front',
184+
'clean'
185+
]);
186+
});
187+
};

LICENSE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2017 Myles Shannon
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# QuickJot | "Making it quick"
2+
3+
## This is an AngularJS front-end demonstrting the usage of a cross-origin Laravel back-end JSON API found at [(php|rails).mylesshannon.me](https://github.com/MylesShannon/php.mylesshannon.me)
4+
5+
### Acquiring required libraries and dependencies for compiling src
6+
```sh
7+
npm install
8+
bower install
9+
```
10+
11+
## Running/building this project...
12+
### Serving for development
13+
```sh
14+
grunt serve
15+
```
16+
### Building for production
17+
```sh
18+
grunt prod
19+
```

bower.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"name": "SpecCheck",
3+
"description": "A webapp for sharing and reviewing RC blackbox logs",
4+
"main": "./dist/index.html",
5+
"authors": [
6+
"Myles Shannon"
7+
],
8+
"license": "MIT",
9+
"keywords": [
10+
"RC",
11+
"multirotor",
12+
"quadcopter",
13+
"AngularJS"
14+
],
15+
"homepage": "https://jot.mylesshannon.me",
16+
"ignore": [
17+
"**/.*",
18+
"node_modules",
19+
"bower_components",
20+
"test",
21+
"tests"
22+
],
23+
"devDependencies": {
24+
"jquery": "^2.2.3",
25+
"angular": "^1.5.7",
26+
"angular-route": "^1.5.7",
27+
"font-awesome": "^4.6.3",
28+
"angular-xeditable": "https://github.com/vitalets/angular-xeditable.git#^0.2.0",
29+
"bootstrap": "^3.3.6",
30+
"satellizer": "^0.15.3",
31+
"angular-toastr": "^2.0.0",
32+
"angular-animate": "^1.5.8",
33+
"angular-cookies": "^1.5.8"
34+
},
35+
"exportsOverride": {
36+
"jquery": {
37+
"js": "dist/jquery.min.js"
38+
},
39+
"angular": {
40+
"js": [
41+
"angular.min.js",
42+
"angular.min.js.map"
43+
]
44+
},
45+
"angular-route": {
46+
"js": [
47+
"angular-route.min.js",
48+
"angular-route.min.js.map"
49+
]
50+
},
51+
"angular-cookies": {
52+
"js": [
53+
"angular-cookies.min.js",
54+
"angular-cookies.min.js.map"
55+
]
56+
},
57+
"angular-xeditable": {
58+
"js": "dist/js/xeditable.min.js",
59+
"css": "dist/css/xeditable.min.css"
60+
},
61+
"font-awesome": {
62+
"css": "css/font-awesome.min.css",
63+
"fonts": "fonts/*"
64+
},
65+
"bootstrap": {
66+
"js": "dist/js/bootstrap.min.js",
67+
"fonts": "dist/fonts/*"
68+
},
69+
"satellizer": {
70+
"js": "dist/satellizer.min.js"
71+
},
72+
"angular-toastr": {
73+
"js": "dist/angular-toastr.tpls.min.js",
74+
"css": "dist/angular-toastr.min.css"
75+
},
76+
"angular-animate": {
77+
"js": [
78+
"angular-animate.min.js",
79+
"angular-animate.min.js.map"
80+
]
81+
}
82+
}
83+
}

0 commit comments

Comments
 (0)