Skip to content

Commit

Permalink
chore: debug-local
Browse files Browse the repository at this point in the history
  • Loading branch information
meixg committed Dec 3, 2021
1 parent 0537911 commit 3b84c0b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ vendor/
test/cases/*/ssr.js
test/cases/*/ssr.php
.vscode
/example
/example
bin/output.js
bin/component*.js
26 changes: 26 additions & 0 deletions bin/debug-local.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { markExternalComponent, SanProject } = require('../dist/index')
const fs = require('fs')
const path = require('path')

markExternalComponent({
isExternalComponent (id) {
if (id === './search-ui') {
return true
}
}
})

const { MyComponent } = require('./component')

const sanProject = new SanProject()
const res = sanProject.compileToSource(MyComponent)

console.log(res)

fs.writeFileSync(path.resolve(__dirname, './output.js'), res)

// const render = require('./output')

// const res = render({})

// console.log(res)

0 comments on commit 3b84c0b

Please sign in to comment.