tweaks to build process

This commit is contained in:
bryan newbold
2024-04-12 14:26:52 -07:00
committed by Dan Abramov
parent 927f6c9bcc
commit 2a3deaf790
3 changed files with 43 additions and 38 deletions
+1
View File
@@ -28,6 +28,7 @@ lint: ## Run style checks and verify syntax
.PHONY: deps .PHONY: deps
deps: ## Installs dependent libs using 'yarn install' deps: ## Installs dependent libs using 'yarn install'
yarn install --frozen-lockfile yarn install --frozen-lockfile
cd bskyembed && yarn install --frozen-lockfile
.PHONY: nvm-setup .PHONY: nvm-setup
nvm-setup: ## Use NVM to install and activate node+yarn nvm-setup: ## Use NVM to install and activate node+yarn
+4
View File
@@ -14,6 +14,10 @@ templates/*-embed.html
static/embed/*.html static/embed/*.html
static/embed/assets/*.js static/embed/assets/*.js
static/embed/assets/*.css 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 # Don't ignore this file
!.gitignore !.gitignore
+38 -38
View File
@@ -1,49 +1,49 @@
// const path = require('node:path') const path = require('node:path')
// const fs = require('node:fs') 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( const embedAssetSource = path.join(projectRoot, 'bskyembed', 'dist', 'static')
// projectRoot,
// 'bskyembed',
// 'dist',
// 'static',
// 'embed',
// 'assets',
// )
// const embedAssetDest = path.join( const embedAssetDest = path.join(projectRoot, 'bskyweb', 'embedr-static')
// projectRoot,
// 'web-build',
// 'static',
// 'embed',
// 'assets',
// )
// 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 // additional entrypoints will need more work, but this'll do for now
// const embedHtmlSource = path.join( const embedHomeHtmlSource = path.join(
// projectRoot, projectRoot,
// 'bskyembed', 'bskyembed',
// 'dist', 'dist',
// 'index.html', 'index.html',
// ) )
// const embedHtmlDest = path.join( const embedHomeHtmlDest = path.join(
// projectRoot, projectRoot,
// 'web-build', 'bskyweb',
// 'static', 'embedr-templates',
// 'embed', 'home.html',
// 'post.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`)