Skip to content

Commit

Permalink
Cleaned stuff up
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxUSA committed Nov 30, 2017
1 parent ab7af77 commit 6ecd922
Show file tree
Hide file tree
Showing 48 changed files with 267 additions and 1,140 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"devel":true,
"jquery":true,
"jasmine": true,
"predef": [ "angular","alertify","", "PouchDB", "CKEDITOR","inject" ],
"predef": [ "angular","alertify","", "PouchDB","inject" ],
"globals":{"openNote":true}
}
18 changes: 0 additions & 18 deletions .project

This file was deleted.

6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- '0.10'
- 0.10
before_script:
- 'npm install -g grunt-cli'


- npm install -g grunt-cli
6 changes: 0 additions & 6 deletions Doc/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ curl -X PUT http:https://127.0.0.1:5984/_config/ssl/key_file \

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

To import a database from older versions check out `/OpenNote/#/settings/legacy/`

# Legacy service
The legacy service is still included to migrate data to the new data structure.
All write endpoints have been hidden with the exception of the file upload api's.

### Automatic(Wizard Based Install)
To run the installer open
`<install path>/Service/install.php`
Expand Down
316 changes: 160 additions & 156 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,162 +1,166 @@
module.exports = function(grunt) {
//Initializing the configuration object
grunt.initConfig({
compress: {
main: {
options: {
archive: "build/version.zip"
},
files: [{
src: ["**/*"],
cwd:"OpenNote/",
expand: true
}]
}
},
jshint: {
options:{
},
all: [ "**/*.js*",//Order matters
"!node_modules/**",
"!OpenNote/bower_components/**"]
},
//Style
less: {
devDark: {
options: {
paths: ["assets/css"],
modifyVars: {
offset: "#000000"
}
},
files: {
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/dark/note.css": "OpenNote/openNote/style/invert/note.less",
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
"OpenNote/openNote/style/invert/dark/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
}
},
devLight: {
options: {
paths: ["assets/css"],
modifyVars: {
offset: "#FFFFFF"
}
},
files: {
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/light/note.css": "OpenNote/openNote/style/invert/note.less",
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
"OpenNote/openNote/style/invert/light/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
}
},
prodDark: {
options: {
paths: ["assets/css"],
cleancss: true,
modifyVars: {
offset: "#000000"
}
},
files: {
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/dark/note.css": "OpenNote/openNote/style/invert/note.less",
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
"OpenNote/openNote/style/invert/dark/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
}
},
prodLight: {
options: {
paths: ["assets/css"],
cleancss: true,
modifyVars: {
offset: "#FFFFFF"
}
},
files: {
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/light/note.css": "OpenNote/openNote/style/invert/note.less",
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less",
"OpenNote/openNote/style/invert/light/intojs.css": "OpenNote/openNote/style/invert/introjs.less"
}
}
},
//Testing setup
karma: {
unit: {
configFile: "OpenNote.Test/karma.conf.js",
background: true
},
travis: {
configFile: "OpenNote.Test/karma.conf.js",
singleRun: true,
browsers: ["PhantomJS"]//Override config browsers
}
},
watch: {
karma: {
files: ["src/**/*.js", "test/unit/**/*.js"],
tasks: ["karma:unit:run"]
}
},
shell: {
bowerInstall: {
command: [ "cd OpenNote",
"bower install" ].join("&&")
},
clean:{
command: [ "rm -rf build",
"cd OpenNote",
"rm -rf bower_components",
"cd openNote/style/invert/",
"rm -rf dark light"].join("&&")
}
},
//HTML 5
manifest: {
generate: {
options: {
basePath: "OpenNote/",
exclude: ["openNote.appcache", "Service", "bower_components/intro.js"],
verbose: true,
timestamp: true,
hash: true,
master: ["index.html"]
},
src: [
"**/*.js",
"**/*.css",
"**/*.html",
"**/*.png",
"**/*.jpg"
],
dest: "OpenNote/openNote.appcache"
}
}
});
//Initializing the configuration object
grunt.initConfig({
compress: {
main: {
options: {
archive: "build/version.zip"
},
files: [{
src: ["**/*"],
cwd: "OpenNote/",
expand: true
}]
}
},
connect: {
server: {
options: {
port: 8080,
base: "OpenNote",
keepalive:true
}
}
},
jshint: {
options: {},
all: ["**/*.js*", //Order matters
"!node_modules/**",
"!OpenNote/node_moduless/**"
]
},
//Style
less: {
devDark: {
options: {
paths: ["assets/css"],
modifyVars: {
offset: "#000000"
}
},
files: {
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
}
},
devLight: {
options: {
paths: ["assets/css"],
modifyVars: {
offset: "#FFFFFF"
}
},
files: {
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
}
},
prodDark: {
options: {
paths: ["assets/css"],
cleancss: true,
modifyVars: {
offset: "#000000"
}
},
files: {
"OpenNote/openNote/style/invert/dark/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/dark/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
}
},
prodLight: {
options: {
paths: ["assets/css"],
cleancss: true,
modifyVars: {
offset: "#FFFFFF"
}
},
files: {
"OpenNote/openNote/style/invert/light/style.css": "OpenNote/openNote/style/invert/style.less",
"OpenNote/openNote/style/invert/light/alertify.css": "OpenNote/openNote/style/invert/alertify.less"
}
}
},
//Testing setup
karma: {
unit: {
configFile: "OpenNote.Test/karma.conf.js",
background: true
},
travis: {
configFile: "OpenNote.Test/karma.conf.js",
singleRun: true,
browsers: ["PhantomJS"] //Override config browsers
}
},
watch: {
karma: {
files: ["src/**/*.js", "test/unit/**/*.js"],
tasks: ["karma:unit:run"]
}
},
shell: {
npmInstall: {
command: ["cd OpenNote",
"npm install"
].join("&&")
},
clean: {
command: ["rm -rf build",
"cd OpenNote",
"rm -rf node_moduless",
"cd openNote/style/invert/",
"rm -rf dark light"
].join("&&")
}
},
//HTML 5
manifest: {
generate: {
options: {
basePath: "OpenNote/",
exclude: ["openNote.appcache", "Service"],
verbose: true,
timestamp: true,
hash: true,
master: ["index.html"]
},
src: [
"**/*.js",
"**/*.css",
"**/*.html",
"**/*.png",
"**/*.jpg"
],
dest: "OpenNote/openNote.appcache"
}
}
});

//Plugin loading
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-karma");
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-manifest");
grunt.loadNpmTasks("grunt-contrib-compress");
//Plugin loading
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-karma");
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-manifest");
grunt.loadNpmTasks("grunt-contrib-compress");
grunt.loadNpmTasks("grunt-contrib-connect");

//Task definition
//css
grunt.registerTask("buildDevCSS", ["less:devDark","less:devLight"]);
grunt.registerTask("buildProdCSS", ["less:prodDark","less:prodLight"]);
//Task definition
//css
grunt.registerTask("buildDevCSS", ["less:devDark", "less:devLight"]);
grunt.registerTask("buildProdCSS", ["less:prodDark", "less:prodLight"]);

//deployment
// you can run individual command using the plug-in command syntax suck as manifest:generate or shell:clean
grunt.registerTask("build", ["shell:bowerInstall", "buildDevCSS", "manifest:generate"]);
grunt.registerTask("default", ["build"]);
grunt.registerTask("deploy", ["shell:clean", "shell:bowerInstall", "buildProdCSS", "manifest:generate","compress"]);
//deployment
// you can run individual command using the plug-in command syntax suck as manifest:generate or shell:clean
grunt.registerTask("build", ["shell:npmInstall", "buildDevCSS", "manifest:generate"]);
grunt.registerTask("default", ["build", "connect:server"]);
grunt.registerTask("deploy", ["shell:clean", "shell:npmInstall", "buildProdCSS", "manifest:generate", "compress"]);

//testing
grunt.registerTask("devmode", ["karma:unit", "watch"]);
grunt.registerTask("test", ["karma:travis"]);
grunt.registerTask("ci", ["build","jshint:all","karma:travis"]);
//testing
grunt.registerTask("devmode", ["karma:unit", "watch"]);
grunt.registerTask("test", ["karma:travis"]);
grunt.registerTask("ci", ["build", "jshint:all", "karma:travis"]);
};
6 changes: 0 additions & 6 deletions OpenNote.Test/unit/folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ describe("folderController", function() {
$scope = $rootScope.$new();
this.$rootScope=$rootScope;

$rootScope.helpContent={
newNoteButton: "",
newFolderButton: "",
findButton: ""
};

$rootScope.buttons=[];

/**
Expand Down
Loading

0 comments on commit 6ecd922

Please sign in to comment.