diff --git a/Gulpfile.js b/Gulpfile.js index dd42025..fb1a75c 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -65,7 +65,8 @@ gulp.task('dist-node-modules', function () { return gulp.src([ 'node_modules/bootstrap/**/*', 'node_modules/angular/**/*', - 'node_modules/jquery/**/*' + 'node_modules/jquery/**/*', + 'node_modules/lodash/**/*' ], {base: 'node_modules'}) .pipe(gulp.dest('tmp/vendor')); }); diff --git a/README.md b/README.md index eaac508..6712ef8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A chrome extension for tagging words with semantic information. 1. To try it out, just [download this plugin](https://github.com/nilsnh/tag-youre-it/archive/master.zip). 2. You'll need to have installed [node.js](https://nodejs.org/en/). 3. Go inside the unzipped folder and run `npm install && npm install -g gulp`. In addition to installing development dependencies it will also install Gulp which is useful for active development. -4. Run `gulp serve` to serve up the prototype for live development. +4. ~~Run `gulp serve` to serve up the prototype for live development.~~ In need of a bugfix. 5. Run `gulp dist` to build the chrome plugin in the `dist/` folder. ## Chrome testing diff --git a/package.json b/package.json index 5bf8f37..e3522f1 100644 --- a/package.json +++ b/package.json @@ -22,20 +22,10 @@ "url": "https://github.com/nilsnh/tag-youre-it/issues" }, "homepage": "https://github.com/nilsnh/tag-youre-it", - "devDependencies": { + "dependencies": { "browser-sync": "^2.9.6", - "browserify": "^11.2.0", "gulp": "^3.9.0", "gulp-sourcemaps": "^1.6.0", - "gulp-util": "^3.0.6", - "lodash": "^3.10.1", - "lodash.assign": "^3.2.0", - "tsify": "^0.12.2", - "vinyl-buffer": "^1.0.0", - "vinyl-source-stream": "^1.1.0", - "watchify": "^3.4.0" - }, - "dependencies": { "angular": "^1.4.7", "bootstrap": "^3.3.5", "del": "^2.0.2", @@ -47,7 +37,6 @@ "gulp-typescript": "^2.9.2", "jquery": "^2.1.4", "lodash": "^3.10.1", - "material-design-lite": "^1.0.5", "merge2": "^0.3.6" } } diff --git a/src/content_script_include.js b/src/content_script_include.js index c4288eb..f993eee 100644 --- a/src/content_script_include.js +++ b/src/content_script_include.js @@ -20,7 +20,6 @@ function injectScripts () { function loadPluginCode () { console.log('loading tagit'); loadScript('bundle.js', function () { - debugger; tagIt.init(restoreOldAngularAndJquery); }); } @@ -36,7 +35,7 @@ function injectScripts () { function loadScript (relativeScriptPath, callback) { function translateToPluginPath (relativeScriptPath) { // if "chrome" present, we deduce that we're running as a plugin - if (chrome) { + if (chrome && chrome.extension) { return chrome.extension.getURL(relativeScriptPath); } else { return relativeScriptPath; diff --git a/src/content_script_web.js b/src/content_script_web.js index b8e78f0..f56f70d 100644 --- a/src/content_script_web.js +++ b/src/content_script_web.js @@ -10,8 +10,3 @@ document.addEventListener("DOMContentLoaded", function(event) { if (!document.getElementById('tagit-menu')) injectScripts(); }); }); - -// will be called within a angular service -function storeTagData (tagData) { - console.log('storeTagDataInBrowser was called'); -} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 053cbd9..67cc5c4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,7 +23,7 @@ module tagIt { }); function chromeUrlTranslator(relativeUrl : string) { - if(chrome) { + if(chrome && chrome.extension) { return chrome.extension.getURL(relativeUrl); } else { relativeUrl; diff --git a/src/plugin-specific/popup.html b/src/plugin-specific/popup.html index 8a9324e..659fbf1 100644 --- a/src/plugin-specific/popup.html +++ b/src/plugin-specific/popup.html @@ -2,6 +2,10 @@ Popup menu for TagIt plugin + + + +