tweaks to build process
This commit is contained in:
committed by
Dan Abramov
parent
927f6c9bcc
commit
2a3deaf790
@@ -28,6 +28,7 @@ lint: ## Run style checks and verify syntax
|
||||
.PHONY: deps
|
||||
deps: ## Installs dependent libs using 'yarn install'
|
||||
yarn install --frozen-lockfile
|
||||
cd bskyembed && yarn install --frozen-lockfile
|
||||
|
||||
.PHONY: nvm-setup
|
||||
nvm-setup: ## Use NVM to install and activate node+yarn
|
||||
|
||||
@@ -14,6 +14,10 @@ templates/*-embed.html
|
||||
static/embed/*.html
|
||||
static/embed/assets/*.js
|
||||
static/embed/assets/*.css
|
||||
embedr-static/post-*.js
|
||||
embedr-static/post-*.css
|
||||
embedr-static/index-*.js
|
||||
embedr-static/polyfills-*.js
|
||||
|
||||
# Don't ignore this file
|
||||
!.gitignore
|
||||
|
||||
+38
-38
@@ -1,49 +1,49 @@
|
||||
// const path = require('node:path')
|
||||
// const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
const fs = require('node:fs')
|
||||
|
||||
// const projectRoot = path.join(__dirname, '..')
|
||||
const projectRoot = path.join(__dirname, '..')
|
||||
|
||||
// // copy embed assets to web-build
|
||||
// copy embed assets to embedr
|
||||
|
||||
// const embedAssetSource = path.join(
|
||||
// projectRoot,
|
||||
// 'bskyembed',
|
||||
// 'dist',
|
||||
// 'static',
|
||||
// 'embed',
|
||||
// 'assets',
|
||||
// )
|
||||
const embedAssetSource = path.join(projectRoot, 'bskyembed', 'dist', 'static')
|
||||
|
||||
// const embedAssetDest = path.join(
|
||||
// projectRoot,
|
||||
// 'web-build',
|
||||
// 'static',
|
||||
// 'embed',
|
||||
// 'assets',
|
||||
// )
|
||||
const embedAssetDest = path.join(projectRoot, 'bskyweb', 'embedr-static')
|
||||
|
||||
// fs.cpSync(embedAssetSource, embedAssetDest, {recursive: true})
|
||||
fs.cpSync(embedAssetSource, embedAssetDest, {recursive: true})
|
||||
|
||||
// // copy entrypoint(s) to web-build
|
||||
// copy entrypoint(s) to embedr
|
||||
|
||||
// // additional entrypoints will need more work, but this'll do for now
|
||||
// const embedHtmlSource = path.join(
|
||||
// projectRoot,
|
||||
// 'bskyembed',
|
||||
// 'dist',
|
||||
// 'index.html',
|
||||
// )
|
||||
// additional entrypoints will need more work, but this'll do for now
|
||||
const embedHomeHtmlSource = path.join(
|
||||
projectRoot,
|
||||
'bskyembed',
|
||||
'dist',
|
||||
'index.html',
|
||||
)
|
||||
|
||||
// const embedHtmlDest = path.join(
|
||||
// projectRoot,
|
||||
// 'web-build',
|
||||
// 'static',
|
||||
// 'embed',
|
||||
// 'post.html',
|
||||
// )
|
||||
const embedHomeHtmlDest = path.join(
|
||||
projectRoot,
|
||||
'bskyweb',
|
||||
'embedr-templates',
|
||||
'home.html',
|
||||
)
|
||||
|
||||
// fs.copyFileSync(embedHtmlSource, embedHtmlDest)
|
||||
fs.copyFileSync(embedHomeHtmlSource, embedHomeHtmlDest)
|
||||
|
||||
// console.log(`Copied embed assets to web-build`)
|
||||
const embedPostHtmlSource = path.join(
|
||||
projectRoot,
|
||||
'bskyembed',
|
||||
'dist',
|
||||
'post.html',
|
||||
)
|
||||
|
||||
console.log('post-embed-build.js - waiting for embedr!')
|
||||
const embedPostHtmlDest = path.join(
|
||||
projectRoot,
|
||||
'bskyweb',
|
||||
'embedr-templates',
|
||||
'postEmbed.html',
|
||||
)
|
||||
|
||||
fs.copyFileSync(embedPostHtmlSource, embedPostHtmlDest)
|
||||
|
||||
console.log(`Copied embed assets to embedr`)
|
||||
|
||||
Reference in New Issue
Block a user