TagSpaces is an offline, open source, document manager with tagging support
refactoring the grunt config
uggrocke5287928d95f
diff --git a/Gruntfile.js b/Gruntfile.jsindex 4d080a8aa..25991306f 100644--- a/Gruntfile.js+++ b/Gruntfile.js@@ -3,9 +3,10 @@ module.exports = function(grunt) {grunt.initConfig({buildsDir: "../builds",cordovaDevDir: "/home/na/TagSpaces/cordova/www",+ cordovaIOSDevDir: "/home/na/TagSpaces/cordova-ios/www",//default.locations.android = {"name": "Photos", "path": "DCIM"}, {"name": "Downloads", "path": "Download"}clean: {- cordova: {+ cordovaAndroid: {options: {force: true},@@ -15,16 +16,19 @@ module.exports = function(grunt) {src: ['**/*'],}]},+ cordovaIOS: {+ options: {+ force: true+ },+ files: [{+ expand: true,+ cwd: '<%= cordovaIOSDevDir %>',+ src: ['**/*'],+ }]+ }},copy: {- /*templates: {- files: [- { src: 'default.settings.tmpl.js', dest: 'data/js/settings.default.js' },- //{ src: 'data/mozilla/mozilla.package.tmpl.json', dest: 'package.json' },- { src: 'data/chromelight/chrome.manifest.tmpl.json', dest: 'data/manifest.json' }- ]- },*/- cordova: {+ cordovaAndroid: {files: [{expand: true,cwd: 'data/assets',@@ -141,6 +145,124 @@ module.exports = function(grunt) {src: 'data/loader.js',dest: '<%= cordovaDevDir %>/loader.js'}]+ },+ cordovaIOS: {+ files: [{+ expand: true,+ cwd: 'data/assets',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/assets'+ }, {+ expand: true,+ cwd: 'data/libs',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/libs'+ }, {+ expand: true,+ cwd: 'data/js',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/js'+ }, {+ expand: true,+ cwd: 'data/locales',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/locales'+ }, {+ expand: true,+ cwd: 'data/templates',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/templates'+ }, {+ expand: true,+ cwd: 'data/ext/perspectiveList/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/perspectiveList/'+ }, {+ expand: true,+ cwd: 'data/ext/perspectiveGrid/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/perspectiveGrid/'+ }, {+ expand: true,+ cwd: 'data/ext/editorHTML/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/editorHTML/'+ }, {+ expand: true,+ cwd: 'data/ext/editorJSON/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/editorJSON/'+ }, {+ expand: true,+ cwd: 'data/ext/editorText/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/editorText/'+ }, {+ expand: true,+ cwd: 'data/ext/editorODF/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/editorODF/'+ }, {+ expand: true,+ cwd: 'data/ext/viewerText/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerText'+ }, {+ expand: true,+ cwd: 'data/ext/viewerHTML/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerHTML'+ }, {+ expand: true,+ cwd: 'data/ext/viewerMHTML/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerMHTML'+ }, {+ expand: true,+ cwd: 'data/ext/viewerPDF/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerPDF'+ }, {+ expand: true,+ cwd: 'data/ext/viewerImage/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerImage/'+ }, {+ expand: true,+ cwd: 'data/ext/viewerURL/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerURL/'+ }, {+ expand: true,+ cwd: 'data/ext/viewerMD/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerMD/'+ }, {+ expand: true,+ cwd: 'data/ext/viewerBrowser/',+ src: ['**'],+ dest: '<%= cordovaIOSDevDir %>/ext/viewerBrowser/'+ }, {+ expand: true,+ cwd: 'data/cordova',+ src: ['*.js'],+ dest: '<%= cordovaIOSDevDir %>/cordova'+ }, {+ src: 'data/about.html',+ dest: '<%= cordovaIOSDevDir %>/about.html'+ }, {+ src: 'data/index.html',+ dest: '<%= cordovaIOSDevDir %>/index.html'+ }, {+ src: 'data/LICENSE.txt',+ dest: '<%= cordovaIOSDevDir %>/LICENSE.txt'+ }, {+ src: 'data/EULA.txt',+ dest: '<%= cordovaIOSDevDir %>/EULA.txt'+ }, {+ src: 'data/loader.js',+ dest: '<%= cordovaIOSDevDir %>/loader.js'+ }]}},replace: {@@ -173,7 +295,7 @@ module.exports = function(grunt) {dest: 'data/manifest.json'}]},- cordova: {+ cordovaAndroid: {options: {variables: {VERSION: '<%= mainVersion %>',@@ -198,6 +320,32 @@ module.exports = function(grunt) {src: 'data/about.html',dest: '<%= cordovaDevDir %>/about.html'}]+ },+ cordovaIOS: {+ options: {+ variables: {+ VERSION: '<%= mainVersion %>',+ BUILD: '<%= subVersion %>',+ BID: '<%= buildId %>',+ APPNAME: '<%= name %>',+ APPDESCRIPTION: '<%= description %>',+ PACKAGE: '<%= package %>',+ PRODUCTION: 'false',+ DEFAULTLOCATIONS: '',+ DEFAULTPERSPECTIVES: "'perspectiveList', 'perspectiveGrid', 'perspectiveGraph'",+ ACTIVATEDPERSPECTIVES: "{ 'id': 'perspectiveList' }, { 'id': 'perspectiveGrid' }, { 'id': 'perspectiveGraph' }",+ MHTVIEWER: 'viewerBrowser',+ PDFVIEWER: 'viewerBrowser'+ },+ prefix: '@@'+ },+ files: [{+ src: 'data/cordova/config.xml',+ dest: '<%= cordovaIOSDevDir %>/config.xml'+ }, {+ src: 'data/about.html',+ dest: '<%= cordovaIOSDevDir %>/about.html'+ }]}},jshint: {@@ -427,7 +575,8 @@ module.exports = function(grunt) {//grunt.registerTask('dist-doc', ['jsdoc', 'compress:doc']);grunt.registerTask('jsfix', ['jsbeautifier', 'checkstyle']); // 'fixmyjs:core'grunt.registerTask('bump-version', ['init', 'replace:templates']);- grunt.registerTask('prepare-cordova', ['init', 'clean:cordova', 'copy:cordova', 'replace:cordova']);+ grunt.registerTask('prepare-android', ['init', 'clean:cordovaAndroid', 'copy:cordovaAndroid', 'replace:cordovaAndroid']);+ grunt.registerTask('prepare-ios', ['init', 'clean:cordovaIOS', 'copy:cordovaIOS', 'replace:cordovaIOS']);grunt.registerTask('default', ['help']);grunt.registerTask('jsdav', 'Run JSDav Server.', function() {var jsDAV = require("jsDAV/lib/jsdav");@@ -444,7 +593,8 @@ module.exports = function(grunt) {grunt.registerTask('help', 'Printing help for this script.', function() {grunt.log.writeln("Supported grunt tasks:");grunt.log.writeln(" - checkstyle");- grunt.log.writeln(" - prepare-cordova");+ grunt.log.writeln(" - prepare-android");+ grunt.log.writeln(" - prepare-ios");grunt.log.writeln(" - bump-version");});diff --git a/README.md b/README.mdindex ea5ec63e7..e56a39e8c 100644--- a/README.md+++ b/README.md@@ -56,14 +56,14 @@ Get the TagSpaces source code by cloning its repository:$git clone https://github.com/tagspaces/tagspaces.git-#### Run as native Windows, Linux or Mac OS X application+#### Run the native Windows, Linux or Mac OS X application* Download [nw.js](https://github.com/nwjs/nw.js) prebuilt binaries for your system environment.* For Windows: copy `nw.exe, nw.pak, icudt.dll, ffmpegsumo.dll` to `tagspaces/data/node-webkit` directory.* For Linux: copy `nw, nw.pak, icudtl.dat, libffmpegsumo.so` to `tagspaces/data/node-webkit` directory. If you experience issue related to libudev.so.0 read the following [article](https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0).* For Mac OS X: copy `node-webkit.app` to `tagspaces/data/node-webkit` directory.* Run the `nw` executable file.-#### Run as Chrome/Chromium extension+#### Run the Chrome/Chromium extension* Go to the chrome `Settings` and then to `Extension`* Enable the `Developer mode` checkbox in the upper right part of the screen* Click on the `Load unpacked extension...` button@@ -71,7 +71,7 @@ Get the TagSpaces source code by cloning its repository:* Activate the `Allow access to file URLs` check box in the TagSpaces entry, in order to enable the access to your local file system* Start the extension by clicking on the TagSpaces icon in the upper right part of Chrome/Chromium-#### Run as Firefox extension+#### Run the Firefox extension* Download and install the Mozilla Addon SDK following this [article](https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation)* Start the SDK by executing `source bin/activate` in the Addon SDK folder* Go to the your local tagspaces folder and run the following command, where the -p argument specifies some local firefox profile:@@ -102,7 +102,7 @@ If you are having trouble using TagSpaces or have found a bug or you have some i## Feeds- Subscribe to RSS feed updates for the [tagspaces blog](http://tagspaces.org/blog/feed.xml)-- Subscribe to RSS feed updates for the [master branch](https://github.com/tagspaces/tagspace/commits/master.atom)+- Subscribe to RSS feed updates for the [master branch](https://github.com/tagspaces/tagspaces/commits/master.atom)- - -This files is created and edited in `TagSpaces`, using the `viewerMD` and `editorText` extensions.\ No newline at end of file