Skip to content

Commit 6ecd922

Browse files
committed
Cleaned stuff up
1 parent ab7af77 commit 6ecd922

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+267
-1140
lines changed

.jshintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"devel":true,
99
"jquery":true,
1010
"jasmine": true,
11-
"predef": [ "angular","alertify","", "PouchDB", "CKEDITOR","inject" ],
11+
"predef": [ "angular","alertify","", "PouchDB","inject" ],
1212
"globals":{"openNote":true}
1313
}

.project

Lines changed: 0 additions & 18 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
language: node_js
22
node_js:
3-
- '0.10'
3+
- 0.10
44
before_script:
5-
- 'npm install -g grunt-cli'
6-
7-
5+
- npm install -g grunt-cli

Doc/Install.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ curl -X PUT http://127.0.0.1:5984/_config/ssl/key_file \
5252

5353
Now in `/OpenNote/#/settings/database/` put the following connection string in the `Replication url` field `https://admin:[email protected]:6984/opennote`
5454

55-
To import a database from older versions check out `/OpenNote/#/settings/legacy/`
56-
57-
# Legacy service
58-
The legacy service is still included to migrate data to the new data structure.
59-
All write endpoints have been hidden with the exception of the file upload api's.
60-
6155
### Automatic(Wizard Based Install)
6256
To run the installer open
6357
`<install path>/Service/install.php`

Gruntfile.js

Lines changed: 160 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,162 +1,166 @@
11
module.exports = function(grunt) {
2-
//Initializing the configuration object
3-
grunt.initConfig({
4-
compress: {
5-
main: {
6-
options: {
7-
archive: "build/version.zip"
8-
},
9-
files: [{
10-
src: ["**/*"],
11-
cwd:"OpenNote/",
12-
expand: true
13-
}]
14-
}
15-
},
16-
jshint: {
17-
options:{
18-
},
19-
all: [ "**/*.js*",//Order matters
20-
"!node_modules/**",
21-
"!OpenNote/bower_components/**"]
22-
},
23-
//Style
24-
less: {
25-
devDark: {
26-
options: {
27-
paths: ["assets/css"],
28-
modifyVars: {
29-
offset: "#000000"
30-
}
31-
},
32-
files: {
33-
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
34-
"OpenNote/openNote/style/invert/dark/note.css": "OpenNote/openNote/style/invert/note.less",
35-
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
36-
"OpenNote/openNote/style/invert/dark/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
37-
}
38-
},
39-
devLight: {
40-
options: {
41-
paths: ["assets/css"],
42-
modifyVars: {
43-
offset: "#FFFFFF"
44-
}
45-
},
46-
files: {
47-
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
48-
"OpenNote/openNote/style/invert/light/note.css": "OpenNote/openNote/style/invert/note.less",
49-
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
50-
"OpenNote/openNote/style/invert/light/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
51-
}
52-
},
53-
prodDark: {
54-
options: {
55-
paths: ["assets/css"],
56-
cleancss: true,
57-
modifyVars: {
58-
offset: "#000000"
59-
}
60-
},
61-
files: {
62-
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
63-
"OpenNote/openNote/style/invert/dark/note.css": "OpenNote/openNote/style/invert/note.less",
64-
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
65-
"OpenNote/openNote/style/invert/dark/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
66-
}
67-
},
68-
prodLight: {
69-
options: {
70-
paths: ["assets/css"],
71-
cleancss: true,
72-
modifyVars: {
73-
offset: "#FFFFFF"
74-
}
75-
},
76-
files: {
77-
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
78-
"OpenNote/openNote/style/invert/light/note.css": "OpenNote/openNote/style/invert/note.less",
79-
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
80-
"OpenNote/openNote/style/invert/light/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
81-
}
82-
}
83-
},
84-
//Testing setup
85-
karma: {
86-
unit: {
87-
configFile: "OpenNote.Test/karma.conf.js",
88-
background: true
89-
},
90-
travis: {
91-
configFile: "OpenNote.Test/karma.conf.js",
92-
singleRun: true,
93-
browsers: ["PhantomJS"]//Override config browsers
94-
}
95-
},
96-
watch: {
97-
karma: {
98-
files: ["src/**/*.js", "test/unit/**/*.js"],
99-
tasks: ["karma:unit:run"]
100-
}
101-
},
102-
shell: {
103-
bowerInstall: {
104-
command: [ "cd OpenNote",
105-
"bower install" ].join("&&")
106-
},
107-
clean:{
108-
command: [ "rm -rf build",
109-
"cd OpenNote",
110-
"rm -rf bower_components",
111-
"cd openNote/style/invert/",
112-
"rm -rf dark light"].join("&&")
113-
}
114-
},
115-
//HTML 5
116-
manifest: {
117-
generate: {
118-
options: {
119-
basePath: "OpenNote/",
120-
exclude: ["openNote.appcache", "Service", "bower_components/intro.js"],
121-
verbose: true,
122-
timestamp: true,
123-
hash: true,
124-
master: ["index.html"]
125-
},
126-
src: [
127-
"**/*.js",
128-
"**/*.css",
129-
"**/*.html",
130-
"**/*.png",
131-
"**/*.jpg"
132-
],
133-
dest: "OpenNote/openNote.appcache"
134-
}
135-
}
136-
});
2+
//Initializing the configuration object
3+
grunt.initConfig({
4+
compress: {
5+
main: {
6+
options: {
7+
archive: "build/version.zip"
8+
},
9+
files: [{
10+
src: ["**/*"],
11+
cwd: "OpenNote/",
12+
expand: true
13+
}]
14+
}
15+
},
16+
connect: {
17+
server: {
18+
options: {
19+
port: 8080,
20+
base: "OpenNote",
21+
keepalive:true
22+
}
23+
}
24+
},
25+
jshint: {
26+
options: {},
27+
all: ["**/*.js*", //Order matters
28+
"!node_modules/**",
29+
"!OpenNote/node_moduless/**"
30+
]
31+
},
32+
//Style
33+
less: {
34+
devDark: {
35+
options: {
36+
paths: ["assets/css"],
37+
modifyVars: {
38+
offset: "#000000"
39+
}
40+
},
41+
files: {
42+
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
43+
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
44+
}
45+
},
46+
devLight: {
47+
options: {
48+
paths: ["assets/css"],
49+
modifyVars: {
50+
offset: "#FFFFFF"
51+
}
52+
},
53+
files: {
54+
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
55+
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
56+
}
57+
},
58+
prodDark: {
59+
options: {
60+
paths: ["assets/css"],
61+
cleancss: true,
62+
modifyVars: {
63+
offset: "#000000"
64+
}
65+
},
66+
files: {
67+
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
68+
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
69+
}
70+
},
71+
prodLight: {
72+
options: {
73+
paths: ["assets/css"],
74+
cleancss: true,
75+
modifyVars: {
76+
offset: "#FFFFFF"
77+
}
78+
},
79+
files: {
80+
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
81+
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
82+
}
83+
}
84+
},
85+
//Testing setup
86+
karma: {
87+
unit: {
88+
configFile: "OpenNote.Test/karma.conf.js",
89+
background: true
90+
},
91+
travis: {
92+
configFile: "OpenNote.Test/karma.conf.js",
93+
singleRun: true,
94+
browsers: ["PhantomJS"] //Override config browsers
95+
}
96+
},
97+
watch: {
98+
karma: {
99+
files: ["src/**/*.js", "test/unit/**/*.js"],
100+
tasks: ["karma:unit:run"]
101+
}
102+
},
103+
shell: {
104+
npmInstall: {
105+
command: ["cd OpenNote",
106+
"npm install"
107+
].join("&&")
108+
},
109+
clean: {
110+
command: ["rm -rf build",
111+
"cd OpenNote",
112+
"rm -rf node_moduless",
113+
"cd openNote/style/invert/",
114+
"rm -rf dark light"
115+
].join("&&")
116+
}
117+
},
118+
//HTML 5
119+
manifest: {
120+
generate: {
121+
options: {
122+
basePath: "OpenNote/",
123+
exclude: ["openNote.appcache", "Service"],
124+
verbose: true,
125+
timestamp: true,
126+
hash: true,
127+
master: ["index.html"]
128+
},
129+
src: [
130+
"**/*.js",
131+
"**/*.css",
132+
"**/*.html",
133+
"**/*.png",
134+
"**/*.jpg"
135+
],
136+
dest: "OpenNote/openNote.appcache"
137+
}
138+
}
139+
});
137140

138-
//Plugin loading
139-
grunt.loadNpmTasks("grunt-contrib-jshint");
140-
grunt.loadNpmTasks("grunt-contrib-less");
141-
grunt.loadNpmTasks("grunt-contrib-watch");
142-
grunt.loadNpmTasks("grunt-karma");
143-
grunt.loadNpmTasks("grunt-shell");
144-
grunt.loadNpmTasks("grunt-manifest");
145-
grunt.loadNpmTasks("grunt-contrib-compress");
141+
//Plugin loading
142+
grunt.loadNpmTasks("grunt-contrib-jshint");
143+
grunt.loadNpmTasks("grunt-contrib-less");
144+
grunt.loadNpmTasks("grunt-contrib-watch");
145+
grunt.loadNpmTasks("grunt-karma");
146+
grunt.loadNpmTasks("grunt-shell");
147+
grunt.loadNpmTasks("grunt-manifest");
148+
grunt.loadNpmTasks("grunt-contrib-compress");
149+
grunt.loadNpmTasks("grunt-contrib-connect");
146150

147-
//Task definition
148-
//css
149-
grunt.registerTask("buildDevCSS", ["less:devDark","less:devLight"]);
150-
grunt.registerTask("buildProdCSS", ["less:prodDark","less:prodLight"]);
151+
//Task definition
152+
//css
153+
grunt.registerTask("buildDevCSS", ["less:devDark", "less:devLight"]);
154+
grunt.registerTask("buildProdCSS", ["less:prodDark", "less:prodLight"]);
151155

152-
//deployment
153-
// you can run individual command using the plug-in command syntax suck as manifest:generate or shell:clean
154-
grunt.registerTask("build", ["shell:bowerInstall", "buildDevCSS", "manifest:generate"]);
155-
grunt.registerTask("default", ["build"]);
156-
grunt.registerTask("deploy", ["shell:clean", "shell:bowerInstall", "buildProdCSS", "manifest:generate","compress"]);
156+
//deployment
157+
// you can run individual command using the plug-in command syntax suck as manifest:generate or shell:clean
158+
grunt.registerTask("build", ["shell:npmInstall", "buildDevCSS", "manifest:generate"]);
159+
grunt.registerTask("default", ["build", "connect:server"]);
160+
grunt.registerTask("deploy", ["shell:clean", "shell:npmInstall", "buildProdCSS", "manifest:generate", "compress"]);
157161

158-
//testing
159-
grunt.registerTask("devmode", ["karma:unit", "watch"]);
160-
grunt.registerTask("test", ["karma:travis"]);
161-
grunt.registerTask("ci", ["build","jshint:all","karma:travis"]);
162+
//testing
163+
grunt.registerTask("devmode", ["karma:unit", "watch"]);
164+
grunt.registerTask("test", ["karma:travis"]);
165+
grunt.registerTask("ci", ["build", "jshint:all", "karma:travis"]);
162166
};

OpenNote.Test/unit/folder.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ describe("folderController", function() {
2323
$scope = $rootScope.$new();
2424
this.$rootScope=$rootScope;
2525

26-
$rootScope.helpContent={
27-
newNoteButton: "",
28-
newFolderButton: "",
29-
findButton: ""
30-
};
31-
3226
$rootScope.buttons=[];
3327

3428
/**

0 commit comments

Comments
 (0)