Merge pull request #910 from novnc/infra/publish

Set up for Publishing on NPM
This commit is contained in:
Solly Ross 2017-10-05 17:30:24 -04:00 committed by GitHub
commit 75393e6a77
7 changed files with 3434 additions and 30 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ utils/websockify
recordings
*.swp
*~
noVNC-*.tgz

View File

@ -1,21 +1,37 @@
app
core
vendor
.gitmodules
node_modules
# infra JS
/build/
/node_modules/
/tests/
/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
*.swo
tests
.travis.yml
utils
docs/notes
docs/links
docs/release.txt
docs/rfb_notes
docs/*.pdf
vnc.html
vnc_lite.html
karma.conf.js
docs/flash_policy.txt
# documentation (except licenses)
/docs/notes
/docs/links
/docs/release.txt
/docs/rfb_notes
/docs/*.pdf
/docs/flash_policy.txt
/CONTRIBUTING.md

View File

@ -17,4 +17,22 @@ addons:
username: "directxman12"
jwt:
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

View File

@ -1 +1 @@
0.6.1
1.0.0-testing.2

3354
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,18 @@
{
"name": "noVNC",
"version": "0.6.1",
"name": "@novnc/novnc",
"version": "1.0.0-testing.2",
"description": "An HTML5 VNC client",
"main": "karma.conf.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"scripts": {
"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": {
"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)",
"contributors": [
@ -57,5 +56,12 @@
"rollup": "^0.41.4",
"rollup-plugin-node-resolve": "^2.0.0",
"sinon-chai": "^2.8.0"
}
},
"dependencies": {},
"keywords": [
"vnc",
"rfb",
"novnc",
"websockify"
]
}

View File

@ -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('-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('--clean', 'clear the lib folder before building')
.parse(process.argv);
// 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 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;
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
// to the vendor directory
if (!in_path) {
if (vendor_rewrite) {
opts.plugins.push(["import-redirect",
{"root": out_path_base,
"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);
}
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, in_path || paths.main), (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.core, handleDir.bind(null, true, !in_path, in_path || paths.core), (filename, stats) => !no_copy_files.has(filename));
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');
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);