Skip to content

Commit

Permalink
Fix issue with missing functions when used on nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
MgenGlder committed Nov 1, 2021
1 parent 59cb74e commit fd5138a
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 29,458 deletions.
25 changes: 0 additions & 25 deletions Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,6 @@ task 'compile-browser', 'Compile with browserify for the web', ->
.then ->
console.log 'Finished!'

task 'compile-standalone', 'Compile with browserify as a module', ->
browserify
standalone: 'psd',
noParse: [
'fs'
]
.transform('coffeeify')
.require('./shims/png.coffee', expose: './image_exports/png.coffee')
.require('./shims/init.coffee', expose: './psd/init.coffee')
.require('./lib/psd.coffee', expose: 'psd')
.bundle (err, src, map) ->
return console.log(err) if err?
writeFile('./dist/psd-standalone.js', src)
.then ->
minSrc = UglifyJS.minify './dist/psd.js',
outSourceMap: 'psd.js.map'
sourceRoot: '/'

writeFile './dist/psd-standalone.min.js', minSrc.code
minSrc
.then (minSrc) ->
writeFile './dist/psd-standalone.js.map', minSrc.map
.then ->
console.log 'Finished!'

task 'docs:generate', 'Generate documentation', ->
npm = spawn 'npm', ['run-script', 'docs']
npm.stdout.pipe(process.stdout)
Expand Down
Loading

0 comments on commit fd5138a

Please sign in to comment.