@sjcrh/proteinpaint-front 2.83.0 → 2.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bundles.tgz +0 -0
  2. package/init.js +13 -9
  3. package/package.json +2 -2
package/bundles.tgz CHANGED
Binary file
package/init.js CHANGED
@@ -8,6 +8,8 @@ const { execSync } = require('child_process')
8
8
 
9
9
  let URLPATH = process.argv[2] || '.'
10
10
  if (URLPATH.endsWith('/')) URLPATH = URLPATH.slice(0, -1)
11
+ const publicBinOnly = process.argv.includes('--publicBinOnly')
12
+
11
13
  const CWD = process.cwd()
12
14
 
13
15
  console.log('CWD', CWD)
@@ -16,20 +18,22 @@ try {
16
18
  console.log(`making a public directory at ${CWD}`)
17
19
  fs.mkdirSync(`${CWD}/public`)
18
20
  }
19
- if (!fs.existsSync(`${CWD}/public/index.html`)) {
20
- console.log(`creating a public/index.html file`)
21
- fs.copyFileSync(path.join(__dirname, './public/index.html'), `${CWD}/public/index.html`)
22
- }
23
21
  if (fs.existsSync(`${CWD}/public/bin`)) {
24
22
  console.log(`removing the old public/bin at ${CWD}`)
25
23
  // should update as part of v16 upgrade
26
24
  fs.rmdirSync(`${CWD}/public/bin`, { recursive: true, force: true }, () => {})
27
25
  }
28
- if (!fs.existsSync(`${CWD}/public/cards`)) {
29
- console.log(`Copying cards into public/cards folder`)
30
- execSync(`cp -r ${CWD}/node_modules/@sjcrh/proteinpaint-front/public/cards ${CWD}/public/cards`, {
31
- stdio: 'inherit'
32
- })
26
+ if (!publicBinOnly) {
27
+ if (!fs.existsSync(`${CWD}/public/index.html`)) {
28
+ console.log(`creating a public/index.html file`)
29
+ fs.copyFileSync(path.join(__dirname, './public/index.html'), `${CWD}/public/index.html`)
30
+ }
31
+ if (!fs.existsSync(`${CWD}/public/cards`)) {
32
+ console.log(`Copying cards into public/cards folder`)
33
+ execSync(`cp -r ${CWD}/node_modules/@sjcrh/proteinpaint-front/public/cards ${CWD}/public/cards`, {
34
+ stdio: 'inherit'
35
+ })
36
+ }
33
37
  }
34
38
  const tar = ps.spawnSync('tar', [`-xzf`, `${__dirname}/bundles.tgz`, `-C`, `${CWD}`], { encoding: 'utf8' })
35
39
  if (tar.stderr) throw tar.stderr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-front",
3
- "version": "2.83.0",
3
+ "version": "2.85.0",
4
4
  "browser": "src/app.js",
5
5
  "main": "src/index.js",
6
6
  "bin": "init.js",
@@ -12,7 +12,7 @@
12
12
  "test:integration": "echo 'TODO: front integration tests'"
13
13
  },
14
14
  "devDependencies": {
15
- "@sjcrh/proteinpaint-client": "2.83.0",
15
+ "@sjcrh/proteinpaint-client": "2.85.0",
16
16
  "webpack": "^5.76.0",
17
17
  "webpack-cli": "^4.9.2",
18
18
  "webpack-node-externals": "^3.0.0",