pruned package.json. Updated readme.

This commit is contained in:
Nils Norman Haukås 2015-10-25 21:11:23 +01:00
parent 533dfc62d2
commit 7377c38efb
8 changed files with 14 additions and 25 deletions

View file

@ -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'));
});

View file

@ -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

View file

@ -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"
}
}

View file

@ -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;

View file

@ -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');
}

View file

@ -23,7 +23,7 @@ module tagIt {
});
function chromeUrlTranslator(relativeUrl : string) {
if(chrome) {
if(chrome && chrome.extension) {
return chrome.extension.getURL(relativeUrl);
} else {
relativeUrl;

View file

@ -2,6 +2,10 @@
<html>
<head>
<title>Popup menu for TagIt plugin</title>
<script src="vendor/lodash/index.js"></script>
<script src="popup.js"></script>
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/dist/css/bootstrap.min.css">
<style type="text/css">
.container {
@ -32,6 +36,6 @@
</div>
</form>
</div>
<script src="popup.js"></script>
</body>
</html>

View file

@ -1,6 +1,7 @@
// Runs at the end of the Wire up listeners to popup menu
document.getElementById('js-open-menu').addEventListener('click', openMenu);
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById('js-open-menu').addEventListener('click', openMenu);
});
function openMenu () {
logToBG('open menu was clicked');