16 Commits

Author SHA1 Message Date
a265493eba 1.0.10 2022-03-10 14:20:20 +01:00
05a0552fe3 fix(core): update 2022-03-10 14:20:19 +01:00
292c99e9d9 1.0.9 2021-03-07 23:38:58 +00:00
4dc71ce246 fix(core): update 2021-03-07 23:38:58 +00:00
7e2961bc84 1.0.8 2021-03-07 23:31:32 +00:00
ac34c908a4 fix(core): update 2021-03-07 23:31:32 +00:00
92604a87a0 1.0.7 2021-03-07 23:27:01 +00:00
1b35948d70 fix(core): update 2021-03-07 23:27:01 +00:00
264a21ab4b 1.0.6 2021-03-07 23:26:00 +00:00
d472e18ff0 fix(core): update 2021-03-07 23:25:59 +00:00
dbff40819f 1.0.5 2020-07-08 00:48:45 +00:00
67822b36d3 fix(core): update 2020-07-08 00:48:45 +00:00
f1d348bb6a 1.0.4 2020-07-07 20:07:22 +00:00
fab41e358c fix(core): update 2020-07-07 20:07:21 +00:00
a878130d6c 1.0.3 2020-07-07 18:34:51 +00:00
c7d61bec0b fix(core): update 2020-07-07 18:34:50 +00:00
8 changed files with 21015 additions and 3368 deletions

View File

@@ -19,23 +19,36 @@ mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
only:
- tags
tags: tags:
- lossless - lossless
- docker - docker
- notpriv - notpriv
audit: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high - npmci command npm audit --audit-level=high --only=dev
tags: tags:
- lossless
- docker - docker
- notpriv allow_failure: true
# ==================== # ====================
# test stage # test stage
@@ -50,9 +63,7 @@ testStable:
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- priv
testBuild: testBuild:
stage: test stage: test
@@ -63,9 +74,7 @@ testBuild:
- npmci command npm run build - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- notpriv
release: release:
stage: release stage: release
@@ -85,6 +94,8 @@ release:
codequality: codequality:
stage: metadata stage: metadata
allow_failure: true allow_failure: true
only:
- tags
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g tslint typescript
- npmci npm prepare - npmci npm prepare

View File

@@ -15,7 +15,7 @@
"properties": { "properties": {
"projectType": { "projectType": {
"type": "string", "type": "string",
"enum": ["website", "element", "service", "npm"] "enum": ["website", "element", "service", "npm", "wcc"]
} }
} }
} }

24308
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartparcel", "name": "@pushrocks/smartparcel",
"version": "1.0.2", "version": "1.0.10",
"private": false, "private": false,
"description": "a wrapper for parcel", "description": "a wrapper for parcel",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@@ -12,16 +12,17 @@
"build": "(tsbuild --web)" "build": "(tsbuild --web)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.29",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.64",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^4.0.8",
"@types/node": "^10.11.7", "@types/node": "^17.0.21",
"tslint": "^5.11.0", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartpath": "^4.0.3", "@pushrocks/smartpath": "^4.0.3",
"parcel-bundler": "^1.12.4" "@types/parcel-bundler": "1.12.3",
"parcel-bundler": "1.12.3"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",
@@ -34,5 +35,8 @@
"cli.js", "cli.js",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
],
"browserslist": [
"last 1 chrome versions"
] ]
} }

View File

@@ -1,4 +1,4 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartparcel from '../ts/index'; import * as smartparcel from '../ts/index';
tap.test('first test', async () => { tap.test('first test', async () => {

View File

@@ -1 +1 @@
export * from './parcel.classes.parcel'; export * from './parcel.classes.parcel';

View File

@@ -25,6 +25,9 @@ export class Parcel {
public options: plugins.parcel.ParcelOptions; public options: plugins.parcel.ParcelOptions;
public entryFiles: string | string[] = plugins.path.join(process.cwd(), './html/index.html'); public entryFiles: string | string[] = plugins.path.join(process.cwd(), './html/index.html');
/**
* builds and serves
*/
public async start() { public async start() {
const bundler = new plugins.parcel(this.entryFiles, this.options); const bundler = new plugins.parcel(this.entryFiles, this.options);
@@ -33,6 +36,23 @@ export class Parcel {
const bundle = await bundler.serve(3002); const bundle = await bundler.serve(3002);
} }
/**
* just builds
*/
public async build() {
const bundler = new plugins.parcel(this.entryFiles, {
...this.options,
watch: false,
});
// Run the bundler, this returns the main bundle
// Use the events if you're using watch mode as this promise will only trigger once and not for every rebuild
const bundle = await bundler.bundle().catch((e) => {
console.error(e);
throw e;
});
}
constructor(fromArg: string | string[], outputDirArg: string, outputFileArg: string) { constructor(fromArg: string | string[], outputDirArg: string, outputFileArg: string) {
this.entryFiles = fromArg; this.entryFiles = fromArg;
this.options = { this.options = {

View File

@@ -6,9 +6,7 @@ export { path };
// @pushrocks scope // @pushrocks scope
import * as smartpath from '@pushrocks/smartpath'; import * as smartpath from '@pushrocks/smartpath';
export { export { smartpath };
smartpath
};
// third party scope // third party scope
import parcel from 'parcel-bundler'; import parcel from 'parcel-bundler';