Merge pull request #910 from novnc/infra/publish
Set up for Publishing on NPM
This commit is contained in:
commit
75393e6a77
|
@ -9,3 +9,4 @@ utils/websockify
|
||||||
recordings
|
recordings
|
||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
|
noVNC-*.tgz
|
||||||
|
|
50
.npmignore
50
.npmignore
|
@ -1,21 +1,37 @@
|
||||||
app
|
# infra JS
|
||||||
core
|
/build/
|
||||||
vendor
|
/node_modules/
|
||||||
.gitmodules
|
/tests/
|
||||||
node_modules
|
/utils/
|
||||||
|
/recordings/
|
||||||
|
/vendor/sinon.js
|
||||||
|
|
||||||
|
# noVNC application files
|
||||||
|
/app
|
||||||
|
/vendor/browser-es-module-loader
|
||||||
|
/vendor/promise.js
|
||||||
|
/vnc.html
|
||||||
|
/vnc_lite.html
|
||||||
|
|
||||||
|
# raw translation files
|
||||||
|
/po
|
||||||
|
|
||||||
|
# config files
|
||||||
|
/.travis.yml
|
||||||
|
/karma.conf.js
|
||||||
|
|
||||||
|
# various other files
|
||||||
|
/.gitmodules
|
||||||
.*
|
.*
|
||||||
*~
|
*~
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
tests
|
|
||||||
.travis.yml
|
# documentation (except licenses)
|
||||||
utils
|
/docs/notes
|
||||||
docs/notes
|
/docs/links
|
||||||
docs/links
|
/docs/release.txt
|
||||||
docs/release.txt
|
/docs/rfb_notes
|
||||||
docs/rfb_notes
|
/docs/*.pdf
|
||||||
docs/*.pdf
|
/docs/flash_policy.txt
|
||||||
vnc.html
|
/CONTRIBUTING.md
|
||||||
vnc_lite.html
|
|
||||||
karma.conf.js
|
|
||||||
docs/flash_policy.txt
|
|
||||||
|
|
18
.travis.yml
18
.travis.yml
|
@ -17,4 +17,22 @@ addons:
|
||||||
username: "directxman12"
|
username: "directxman12"
|
||||||
jwt:
|
jwt:
|
||||||
secure: "d3ekMYslpn6R4f0ajtRMt9SUFmNGDiItHpqaXC5T4KI0KMEsxgvEOfJot5PiFFJWg1DSpJZH6oaW2UxGZ3duJLZrXIEd/JePY8a6NtT35BNgiDPgcp+eu2Bu3rhrSNg7/HEsD1ma+JeUTnv18Ai5oMFfCCQJx2J6osIxyl/ZVxA="
|
secure: "d3ekMYslpn6R4f0ajtRMt9SUFmNGDiItHpqaXC5T4KI0KMEsxgvEOfJot5PiFFJWg1DSpJZH6oaW2UxGZ3duJLZrXIEd/JePY8a6NtT35BNgiDPgcp+eu2Bu3rhrSNg7/HEsD1ma+JeUTnv18Ai5oMFfCCQJx2J6osIxyl/ZVxA="
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- name: deploy
|
||||||
|
if: tag is PRESENT
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: deploy
|
||||||
|
script: skip
|
||||||
|
before_script: skip
|
||||||
|
deploy:
|
||||||
|
provider: npm
|
||||||
|
email: directxman12+npm@gmail.com
|
||||||
|
api_key:
|
||||||
|
secure: cIidkFmvkdmdwWsqBpxyPUCzBqgK8LhPiNxTrIfhwbUunMsJep9MiiBJtv8poVYG2Y4yfiZmqGn4nfetUdc/LDctd73j+/EM4Z/NUDexVAhJ+9/qCogvpJsSQ96VQo7yBceW4E1fBM3WCU0kcGToYIVSSrwvvRDtJfeYJf2Qqw0=
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: novnc/noVNC
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.6.1
|
1.0.0-testing.2
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
|
@ -1,19 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "noVNC",
|
"name": "@novnc/novnc",
|
||||||
"version": "0.6.1",
|
"version": "1.0.0-testing.2",
|
||||||
"description": "An HTML5 VNC client",
|
"description": "An HTML5 VNC client",
|
||||||
"main": "karma.conf.js",
|
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "docs",
|
"doc": "docs",
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "PATH=$PATH:node_modules/karma/bin karma start karma.conf.js",
|
"test": "PATH=$PATH:node_modules/karma/bin karma start karma.conf.js",
|
||||||
"prepublish": "node ./utils/use_require.js --as commonjs"
|
"prepare": "node ./utils/use_require.js --as commonjs --clean"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/novnc/noVNC.git"
|
"url": "git+https://github.com/novnc/noVNC.git"
|
||||||
},
|
},
|
||||||
"author": "Joel Martin <github@martintribe.org> (https://github.com/kanaka)",
|
"author": "Joel Martin <github@martintribe.org> (https://github.com/kanaka)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
@ -57,5 +56,12 @@
|
||||||
"rollup": "^0.41.4",
|
"rollup": "^0.41.4",
|
||||||
"rollup-plugin-node-resolve": "^2.0.0",
|
"rollup-plugin-node-resolve": "^2.0.0",
|
||||||
"sinon-chai": "^2.8.0"
|
"sinon-chai": "^2.8.0"
|
||||||
}
|
},
|
||||||
|
"dependencies": {},
|
||||||
|
"keywords": [
|
||||||
|
"vnc",
|
||||||
|
"rfb",
|
||||||
|
"novnc",
|
||||||
|
"websockify"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ program
|
||||||
.option('--as [format]', `output files using various import formats instead of ES6 import and export. Supports ${Array.from(SUPPORTED_FORMATS)}.`)
|
.option('--as [format]', `output files using various import formats instead of ES6 import and export. Supports ${Array.from(SUPPORTED_FORMATS)}.`)
|
||||||
.option('-m, --with-source-maps [type]', 'output source maps when not generating a bundled app (type may be empty for external source maps, inline for inline source maps, or both) ')
|
.option('-m, --with-source-maps [type]', 'output source maps when not generating a bundled app (type may be empty for external source maps, inline for inline source maps, or both) ')
|
||||||
.option('--with-app', 'process app files as well as core files')
|
.option('--with-app', 'process app files as well as core files')
|
||||||
|
.option('--clean', 'clear the lib folder before building')
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
// the various important paths
|
// the various important paths
|
||||||
|
@ -107,8 +108,8 @@ var make_lib_files = function (import_format, source_maps, with_app_dir) {
|
||||||
|
|
||||||
const helpers = require('./use_require_helpers');
|
const helpers = require('./use_require_helpers');
|
||||||
const helper = helpers[import_format];
|
const helper = helpers[import_format];
|
||||||
|
|
||||||
var handleDir = (js_only, in_path_base, filename) => {
|
var handleDir = (js_only, vendor_rewrite, in_path_base, filename) => {
|
||||||
if (no_copy_files.has(filename)) return;
|
if (no_copy_files.has(filename)) return;
|
||||||
|
|
||||||
const out_path = path.join(out_path_base, path.relative(in_path_base, filename));
|
const out_path = path.join(out_path_base, path.relative(in_path_base, filename));
|
||||||
|
@ -133,7 +134,7 @@ var make_lib_files = function (import_format, source_maps, with_app_dir) {
|
||||||
}
|
}
|
||||||
// Adjust for the fact that we move the core files relative
|
// Adjust for the fact that we move the core files relative
|
||||||
// to the vendor directory
|
// to the vendor directory
|
||||||
if (!in_path) {
|
if (vendor_rewrite) {
|
||||||
opts.plugins.push(["import-redirect",
|
opts.plugins.push(["import-redirect",
|
||||||
{"root": out_path_base,
|
{"root": out_path_base,
|
||||||
"redirect": { "vendor/(.+)": "./vendor/$1"}}]);
|
"redirect": { "vendor/(.+)": "./vendor/$1"}}]);
|
||||||
|
@ -160,11 +161,11 @@ var make_lib_files = function (import_format, source_maps, with_app_dir) {
|
||||||
helper.noCopyOverride(paths, no_copy_files);
|
helper.noCopyOverride(paths, no_copy_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
walkDir(paths.core, handleDir.bind(null, true, in_path || paths.core), (filename, stats) => !no_copy_files.has(filename));
|
walkDir(paths.vendor, handleDir.bind(null, true, false, in_path || paths.main), (filename, stats) => !no_copy_files.has(filename));
|
||||||
walkDir(paths.vendor, handleDir.bind(null, true, in_path || paths.main), (filename, stats) => !no_copy_files.has(filename));
|
walkDir(paths.core, handleDir.bind(null, true, !in_path, in_path || paths.core), (filename, stats) => !no_copy_files.has(filename));
|
||||||
|
|
||||||
if (with_app_dir) {
|
if (with_app_dir) {
|
||||||
walkDir(paths.app, handleDir.bind(null, false, in_path || paths.app), (filename, stats) => !no_copy_files.has(filename));
|
walkDir(paths.app, handleDir.bind(null, false, false, in_path), (filename, stats) => !no_copy_files.has(filename));
|
||||||
|
|
||||||
const out_app_path = path.join(out_path_base, 'app.js');
|
const out_app_path = path.join(out_path_base, 'app.js');
|
||||||
if (helper && helper.appWriter) {
|
if (helper && helper.appWriter) {
|
||||||
|
@ -177,4 +178,12 @@ var make_lib_files = function (import_format, source_maps, with_app_dir) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (program.clean) {
|
||||||
|
console.log(`Removing ${paths.lib_dir_base}`);
|
||||||
|
fse.removeSync(paths.lib_dir_base);
|
||||||
|
|
||||||
|
console.log(`Removing ${paths.out_dir_base}`);
|
||||||
|
fse.removeSync(paths.out_dir_base);
|
||||||
|
}
|
||||||
|
|
||||||
make_lib_files(program.as, program.withSourceMaps, program.withApp);
|
make_lib_files(program.as, program.withSourceMaps, program.withApp);
|
||||||
|
|
Loading…
Reference in New Issue