fix(core): update
This commit is contained in:
parent
9abb00261d
commit
c7d61bec0b
18
package-lock.json
generated
18
package-lock.json
generated
@ -1756,7 +1756,6 @@
|
|||||||
"version": "4.17.8",
|
"version": "4.17.8",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.17.8.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fexpress-serve-static-core/-/express-serve-static-core-4.17.8.tgz",
|
||||||
"integrity": "sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw==",
|
"integrity": "sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/qs": "*",
|
"@types/qs": "*",
|
||||||
@ -1828,8 +1827,15 @@
|
|||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "10.17.26",
|
"version": "10.17.26",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.17.26.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.17.26.tgz",
|
||||||
"integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==",
|
"integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw=="
|
||||||
"dev": true
|
},
|
||||||
|
"@types/parcel-bundler": {
|
||||||
|
"version": "1.12.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fparcel-bundler/-/parcel-bundler-1.12.1.tgz",
|
||||||
|
"integrity": "sha512-I7Cy3Uy/HqMa3E7dyPxTkiPFx0gi3bIQxAcZCP8v1vFx+esdVFgbZBnusa6VfoIeFk61/fnVl25RyYKgDHVLtw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/express-serve-static-core": "*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@types/portscanner": {
|
"@types/portscanner": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@ -1854,14 +1860,12 @@
|
|||||||
"@types/qs": {
|
"@types/qs": {
|
||||||
"version": "6.9.3",
|
"version": "6.9.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fqs/-/qs-6.9.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fqs/-/qs-6.9.3.tgz",
|
||||||
"integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==",
|
"integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@types/range-parser": {
|
"@types/range-parser": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2frange-parser/-/range-parser-1.2.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2frange-parser/-/range-parser-1.2.3.tgz",
|
||||||
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==",
|
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@types/relateurl": {
|
"@types/relateurl": {
|
||||||
"version": "0.2.28",
|
"version": "0.2.28",
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^4.0.3",
|
||||||
"parcel-bundler": "^1.12.4"
|
"parcel-bundler": "^1.12.4",
|
||||||
|
"@types/parcel-bundler": "^1.12.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
@ -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,17 @@ 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);
|
||||||
|
|
||||||
|
// 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();
|
||||||
|
}
|
||||||
|
|
||||||
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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user