From 14408b44430405735b8d2b19ceb1572880fb6472 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 28 Dec 2023 02:29:07 +0000 Subject: [PATCH 1/3] chore(release): 1.0.1 [skip ci] ## [1.0.1](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.0.0...v1.0.1) (2023-12-28) ### Bug Fixes * removed webpack.config ([4d3b7de](https://github.com/CoCreate-app/CoCreate-webpack/commit/4d3b7def7b59c0736cbf9b2dbb3e40585486cf92)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f566ec..e755058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.1](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.0.0...v1.0.1) (2023-12-28) + + +### Bug Fixes + +* removed webpack.config ([4d3b7de](https://github.com/CoCreate-app/CoCreate-webpack/commit/4d3b7def7b59c0736cbf9b2dbb3e40585486cf92)) + # 1.0.0 (2023-12-28) diff --git a/package.json b/package.json index 8b4fc9b..f41e1b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cocreate/webpack", - "version": "1.0.0", + "version": "1.0.1", "description": "An intergration with webpack and CoCreateJS.", "keywords": [ "webpack", From b38a0892b3755bf83844cbf2b17264c25d5623dc Mon Sep 17 00:00:00 2001 From: frankpagan Date: Wed, 27 Dec 2023 20:55:50 -0500 Subject: [PATCH 2/3] feat: symlinkCreator --- src/index.js | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index d7aa8e0..75e7472 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,6 @@ const fs = require('fs'); +const path = require('path'); + const upload = require('@cocreate/cli/src/commands/upload.js') class ModuleGenerator { @@ -54,6 +56,7 @@ class ModuleGenerator { }); } } + class fileUploader { constructor(env) { this.env = env; @@ -78,5 +81,39 @@ class fileUploader { } } +class SymlinkCreator { + constructor(options) { + // Store options if necessary, or just hard-code paths + } + + apply(compiler) { + // Use compiler.hooks to tap into the Webpack build process + compiler.hooks.afterEmit.tap('SymlinkPlugin', (compilation) => { + // Perform symlink operations here + symlink('./dist', '../dist', 'dir'); + symlink('./node_modules/@cocreate/pwa/src/service-worker.js', '../service-worker.js', 'file'); + symlink('./node_modules/@cocreate/pwa/src/manifest.webmanifest', '../manifest.webmanifest', 'file'); + symlink('./node_modules/@cocreate/pwa/src/offline.html', '../offline.html', 'file'); + }); + + function symlink(target, destination, option) { + if (fs.existsSync(target)) { + target = path.resolve(target) + + if (!fs.existsSync(destination)) { + destination = path.resolve(destination) + + fs.symlink(target, destination, option, (err) => { + if (err) + console.log(err); + else + console.log("symlink added: ", target); + }) + + } + } + } + } +} -module.exports = { ModuleGenerator, fileUploader }; +module.exports = { ModuleGenerator, fileUploader, SymlinkCreator }; From 89fc18aa375bcae522678163523055e2073557fb Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 28 Dec 2023 03:44:36 +0000 Subject: [PATCH 3/3] chore(release): 1.1.0 [skip ci] # [1.1.0](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.0.1...v1.1.0) (2023-12-28) ### Features * symlinkCreator ([b38a089](https://github.com/CoCreate-app/CoCreate-webpack/commit/b38a0892b3755bf83844cbf2b17264c25d5623dc)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e755058..9bf18ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.1.0](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.0.1...v1.1.0) (2023-12-28) + + +### Features + +* symlinkCreator ([b38a089](https://github.com/CoCreate-app/CoCreate-webpack/commit/b38a0892b3755bf83844cbf2b17264c25d5623dc)) + ## [1.0.1](https://github.com/CoCreate-app/CoCreate-webpack/compare/v1.0.0...v1.0.1) (2023-12-28) diff --git a/package.json b/package.json index f41e1b0..f894980 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cocreate/webpack", - "version": "1.0.1", + "version": "1.1.0", "description": "An intergration with webpack and CoCreateJS.", "keywords": [ "webpack",