Move from bash to npm
This commit is contained in:
parent
33df793458
commit
b980d30c0f
7 changed files with 60 additions and 55 deletions
11
README.md
11
README.md
|
@ -1,9 +1,20 @@
|
||||||
# Hipchat Emoticons for all! #
|
# Hipchat Emoticons for all! #
|
||||||
|
|
||||||
|
## Building for yourself ##
|
||||||
|
Whilst I recommend that you use the plugins that are on the add-on stores of the respective browsers, building the apps yourself is perfectly possible. I build the apps on ubuntu, so have made sure that the build scripts work for me, use on other platforms may vary.
|
||||||
|
### Commands: ###
|
||||||
|
npm clean
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
npm run build-extensions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### To-Do ###
|
### To-Do ###
|
||||||
* Create chrome version
|
* Create chrome version
|
||||||
* Create script to copy files from common to platform directories
|
* Create script to copy files from common to platform directories
|
||||||
* Add other sites support (currently facebook messages popup only)
|
* Add other sites support (currently facebook messages popup only)
|
||||||
|
|
||||||
|
|
||||||
##### Disclaimer: #####
|
##### Disclaimer: #####
|
||||||
As you can tell, the quality of the code isnt perfect, or to a particular standard. Once the plugin works properly to a basic level, I will install some linting software to make the code look nicer, and possibly run smoother too.
|
As you can tell, the quality of the code isnt perfect, or to a particular standard. Once the plugin works properly to a basic level, I will install some linting software to make the code look nicer, and possibly run smoother too.
|
|
@ -1,2 +0,0 @@
|
||||||
#injection testing
|
|
||||||
A basic add-on
|
|
|
@ -1,15 +1,7 @@
|
||||||
var self = require('sdk/self');
|
var self = require('sdk/self');
|
||||||
var pageMod = require("sdk/page-mod");
|
var pageMod = require("sdk/page-mod");
|
||||||
// a dummy function, to show how tests work.
|
|
||||||
// to see how to test this function, look at test/test-index.js
|
|
||||||
function dummy(text, callback) {
|
|
||||||
callback(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pageMod.PageMod({
|
pageMod.PageMod({
|
||||||
include: "*.facebook.com",
|
include: "*.facebook.com",
|
||||||
contentScriptFile: ["./jquery.js", "./script.js"]
|
contentScriptFile: ["./jquery.js", "./script.js"]
|
||||||
});
|
});
|
||||||
exports.dummy = dummy;
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"title": "injection testing",
|
"title": "Hipchat Emoticons for all",
|
||||||
"name": "injectiontesting",
|
"name": "Hipchat emoticons for all",
|
||||||
"version": "0.0.1",
|
"version": "ALPHA",
|
||||||
"description": "A basic add-on",
|
"description": "Use Hipchat emoticons on other sites",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Jake Howard",
|
"author": "TheOrangeOne",
|
||||||
"engines": {
|
"engines": {
|
||||||
"firefox": ">=38.0a1",
|
"firefox": ">=38.0a1",
|
||||||
"fennec": ">=38.0a1"
|
"fennec": ">=38.0a1"
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
var main = require("../");
|
|
||||||
|
|
||||||
exports["test main"] = function(assert) {
|
|
||||||
assert.pass("Unit test running!");
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["test main async"] = function(assert, done) {
|
|
||||||
assert.pass("async Unit test running!");
|
|
||||||
done();
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["test dummy"] = function(assert, done) {
|
|
||||||
main.dummy("foo", function(text) {
|
|
||||||
assert.ok((text === "foo"), "Is the text actually 'foo'");
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
require("sdk/test").run(exports);
|
|
43
package.json
Normal file
43
package.json
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"name": "Hipchat Emoticons for all",
|
||||||
|
"version": "ALPHA",
|
||||||
|
"description": "Use hipchat emoticons on other sites",
|
||||||
|
"main": "src/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"create-dirs": "mkdir -p build/assets build/lib",
|
||||||
|
"build-extensions": "",
|
||||||
|
"build-firefox": "",
|
||||||
|
"build-chrome": "",
|
||||||
|
"build-js": "browserify -t reactify src/index.js -o build/index.js",
|
||||||
|
"copy-firefox": "",
|
||||||
|
"copy-chrome": "",
|
||||||
|
"build": "ulimit -n 512 && npm run create-dirs && npm install && npm run build-js && npm run copy-firefox && npm run copy-chrome",
|
||||||
|
"clean": "rm -rf build/ && rm -rf firefox/data",
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://bitbucket.org/theorangeone/hipchat-emoticons-for-all"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"hipchat",
|
||||||
|
"emoticons"
|
||||||
|
],
|
||||||
|
"author": "TheOrangeOne",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://bitbucket.org/theorangeone/hipchat-emoticons-for-all/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://bitbucket.org/theorangeone/hipchat-emoticons-for-all",
|
||||||
|
"dependencies": {
|
||||||
|
"browserify": "=9.0.3",
|
||||||
|
"ionic-sdk": "=1.0.0",
|
||||||
|
"less": "=2.4.0",
|
||||||
|
"react": "=0.13.2",
|
||||||
|
"react-tools": "=0.13.2",
|
||||||
|
"reactify": "=1.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"jquery": "=2.1.4",
|
||||||
|
"jpm":"=1.0.1"
|
||||||
|
}
|
||||||
|
}
|
20
run.sh
20
run.sh
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Build script for firefox and chrome plugins
|
|
||||||
|
|
||||||
|
|
||||||
function build_firefox {
|
|
||||||
echo "Building Firefox extension..."
|
|
||||||
}
|
|
||||||
|
|
||||||
function build_chrome {
|
|
||||||
echo "Building Chrome extension..."
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$1" == "firefox" ]; then
|
|
||||||
build_firefox
|
|
||||||
elif [ "$1" == "chrome" ]; then
|
|
||||||
build_chrome
|
|
||||||
else
|
|
||||||
build_firefox
|
|
||||||
build_chrome
|
|
||||||
fi
|
|
Reference in a new issue