Skip to content

Commit

Permalink
bump plugin version & updated demo app to {N} 6 RC
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Jul 4, 2019
1 parent fd7484f commit 37d4972
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 54 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [3.2.1](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/3.2.1) (2019-07-04)
[Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/41?closed=1)

## [3.2.0](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/3.2.0) (2019-06-07)
[Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/40?closed=1)

Expand Down
2 changes: 1 addition & 1 deletion demo/app/app.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~/css/core.light.css';
@import '~nativescript-theme-core/css/core.light.css';

.h3 {
margin-top: 18;
Expand Down
5 changes: 2 additions & 3 deletions demo/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import "./bundle-config";
import * as application from 'tns-core-modules/application';
application.start({ moduleName: "main-page" });
import * as application from "tns-core-modules/application";
application.run({ moduleName: "main-page" });
5 changes: 0 additions & 5 deletions demo/app/bundle-config.ts

This file was deleted.

9 changes: 0 additions & 9 deletions demo/app/vendor-platform.android.ts

This file was deleted.

3 changes: 0 additions & 3 deletions demo/app/vendor-platform.ios.ts

This file was deleted.

10 changes: 0 additions & 10 deletions demo/app/vendor.ts

This file was deleted.

47 changes: 39 additions & 8 deletions demo/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function(config) {
config.set({
module.exports = function (config) {
const options = {

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
Expand All @@ -11,9 +11,7 @@ module.exports = function(config) {


// list of files / patterns to load in the browser
files: [
'app/**/*.js'
],
files: ['app/tests/**/*.*'],


// list of files to exclude
Expand Down Expand Up @@ -72,6 +70,39 @@ module.exports = function(config) {

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
singleRun: false
};

setWebpackPreprocessor(config, options);
setWebpack(config, options);

config.set(options);
}

function setWebpackPreprocessor(config, options) {
if (config && config.bundle) {
if (!options.preprocessors) {
options.preprocessors = {};
}

options.files.forEach(file => {
if (!options.preprocessors[file]) {
options.preprocessors[file] = [];
}
options.preprocessors[file].push('webpack');
});
}
}

function setWebpack(config, options) {
if (config && config.bundle) {
const env = {};
env[config.platform] = true;
env.sourceMap = config.debugBrk;
options.webpack = require('./webpack.config')(env);
delete options.webpack.entry;
delete options.webpack.output.libraryTarget;
const invalidPluginsForUnitTesting = ["GenerateBundleStarterPlugin", "GenerateNativeScriptEntryPointsPlugin"];
options.webpack.plugins = options.webpack.plugins.filter(p => !invalidPluginsForUnitTesting.includes(p.constructor.name));
}
}
20 changes: 10 additions & 10 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
"nativescript": {
"id": "org.nativescript.plugindemo.barcodescanner",
"tns-ios": {
"version": "5.0.0"
"version": "6.0.0-rc-2019-06-28-105002-01"
},
"tns-android": {
"version": "5.0.0"
"version": "6.0.0-rc-2019-06-27-172817-03"
}
},
"dependencies": {
"nativescript-barcodescanner": "file:../src",
"nativescript-theme-core": "^1.0.4",
"nativescript-unit-test-runner": "^0.3.4",
"tns-core-modules": "~5.1.2"
"nativescript-unit-test-runner": "0.6.3",
"tns-core-modules": "6.0.0-rc-2019-06-28-175837-02"
},
"devDependencies": {
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",
"karma-jasmine": "^1.0.2",
"karma": "4.1.0",
"karma-jasmine": "2.0.1",
"karma-nativescript-launcher": "^0.4.0",
"nativescript-css-loader": "~0.26.1",
"nativescript-dev-typescript": "~0.7.4",
"nativescript-dev-webpack": "~0.17.0",
"tns-platform-declarations": "^5.0.0",
"nativescript-dev-webpack": "1.0.0-rc-2019-07-02-161545-02",
"tns-platform-declarations": "6.0.0-rc-2019-06-28-175837-02",
"tslint": "~5.11.0",
"typescript": "~3.1.2"
"typescript": "3.4.1",
"karma-webpack": "3.0.5"
},
"scripts": {
"build.plugin": "cd ../src && npm run build"
Expand Down
10 changes: 5 additions & 5 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-barcodescanner",
"version": "3.2.0",
"version": "3.2.1",
"description": "Scan QR/barcodes with your NativeScript app.",
"main": "barcodescanner",
"typings": "index.d.ts",
Expand All @@ -21,12 +21,12 @@
"plugin.link": "npm link && cd ../demo && npm link nativescript-barcodescanner && cd ../src",
"plugin.link.ng": "npm link && cd ../demo-ng && npm link nativescript-barcodescanner && cd ../src",
"plugin.tscwatch": "npm run tsc -- -w",
"demo.ios": "npm run build && cd ../demo && tns run ios --syncAllFiles",
"demo.ios": "npm run build && cd ../demo && tns run ios",
"demo.reset": "cd ../demo && rimraf platforms",
"demo-ng.ios": "npm run build && cd ../demo-ng && tns run ios",
"demo.android": "npm run build && cd ../demo && tns run android --syncAllFiles",
"demo-vue.ios": "npm run tsc && cd ../demo-vue && tns run ios --bundle --syncAllFiles",
"demo-vue.android": "npm run tsc && cd ../demo-vue && tns run android --bundle --syncAllFiles",
"demo.android": "npm run build && cd ../demo && tns run android",
"demo-vue.ios": "npm run tsc && cd ../demo-vue && tns run ios --bundle",
"demo-vue.android": "npm run tsc && cd ../demo-vue && tns run android --bundle",
"plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-barcodescanner && tns plugin add ../src",
"clean": "cd ../demo && rimraf hooks node_modules platforms && cd ../src && rimraf node_modules && npm run plugin.link",
"ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/typings/**'"
Expand Down

0 comments on commit 37d4972

Please sign in to comment.