fix(core): update
This commit is contained in:
		@@ -25,6 +25,9 @@ export class Parcel {
 | 
			
		||||
  public options: plugins.parcel.ParcelOptions;
 | 
			
		||||
  public entryFiles: string | string[] = plugins.path.join(process.cwd(), './html/index.html');
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * builds and serves
 | 
			
		||||
   */
 | 
			
		||||
  public async start() {
 | 
			
		||||
    const bundler = new plugins.parcel(this.entryFiles, this.options);
 | 
			
		||||
 | 
			
		||||
@@ -33,6 +36,17 @@ export class Parcel {
 | 
			
		||||
    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) {
 | 
			
		||||
    this.entryFiles = fromArg;
 | 
			
		||||
    this.options = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user