mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
Updated build scripts
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
node_modules/*
|
||||
4017
build/litegraph.js
4017
build/litegraph.js
File diff suppressed because it is too large
Load Diff
6940
build/litegraph.min.js
vendored
6940
build/litegraph.min.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,9 @@
|
||||
{
|
||||
"name": "litegraph.js",
|
||||
"version": "0.1.2",
|
||||
"description": "A graph node editor similar to PD or UDK Blueprints, it works in a HTML5 Canvas and allow to exported graphs to be included in applications.",
|
||||
"name": "litegraph.js",
|
||||
"main": "litegraph.js",
|
||||
"directories": {
|
||||
"doc": "doc"
|
||||
},
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kriffe/litegraph.js.git"
|
||||
},
|
||||
"description": "A graph node editor similar to PD or UDK Blueprints, it works in a HTML5 Canvas and allow to exported graphs to be included in applications.",
|
||||
"author": "jagenjo",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jagenjo/litegraph.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/kriffe/litegraph.js#readme"
|
||||
}
|
||||
"scripts": {}
|
||||
}
|
||||
82
gruntfile.js
Normal file
82
gruntfile.js
Normal file
@@ -0,0 +1,82 @@
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
projectFiles: ['src/litegraph.js',
|
||||
'src/nodes/base.js',
|
||||
'src/nodes/events.js',
|
||||
'src/nodes/interface.js',
|
||||
'src/nodes/input.js',
|
||||
'src/nodes/math.js',
|
||||
'src/nodes/logic.js',
|
||||
'src/nodes/image.js',
|
||||
'src/nodes/gltextures.js',
|
||||
'src/nodes/glfx.js',
|
||||
'src/nodes/midi.js',
|
||||
'src/nodes/audio.js'
|
||||
],
|
||||
concat: {
|
||||
build: {
|
||||
src: '<%= projectFiles %>',
|
||||
dest: 'build/litegraph.js'
|
||||
}
|
||||
},
|
||||
copy: {
|
||||
parts: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: '',
|
||||
src: ['README.md'],
|
||||
dest: 'build/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
build: {src: ['build/*']}
|
||||
},
|
||||
closureCompiler: {
|
||||
|
||||
options: {
|
||||
compilerFile: 'node_modules/google-closure-compiler/compiler.jar',
|
||||
compilerOpts: {
|
||||
formatting: 'pretty_print',
|
||||
warning_level: 'default'
|
||||
},
|
||||
d32: false, // will use 'java -client -d32 -jar compiler.jar'
|
||||
TieredCompilation: false// will use 'java -server -XX:+TieredCompilation -jar compiler.jar',
|
||||
// ,output_wrapper: '"var LiteGraph = (function(){%output% return LiteGraph;}).call(this);"' //* Make container for all
|
||||
},
|
||||
targetName: {
|
||||
src: '<%= projectFiles %>',
|
||||
dest: 'build/litegraph.min.js'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
grunt.registerTask('buildPackage', function () {
|
||||
var pkg = grunt.config.data.pkg
|
||||
var newPackage = {
|
||||
version: pkg.version,
|
||||
name: 'litegraph.js', //* Static name without ogranisation
|
||||
main: 'litegraph.js',
|
||||
description: pkg.description,
|
||||
dependencies: pkg.dependencies,
|
||||
author: pkg.author,
|
||||
license: 'MIT',
|
||||
scripts: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
grunt.file.write('build/package.json', JSON.stringify(newPackage, undefined, 2))
|
||||
})
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-concat')
|
||||
grunt.loadNpmTasks('grunt-contrib-copy')
|
||||
grunt.loadNpmTasks('grunt-closure-tools')
|
||||
grunt.loadNpmTasks('grunt-contrib-clean')
|
||||
|
||||
grunt.registerTask('build', ['buildPackage', 'copy:parts', 'concat:build', 'closureCompiler'])
|
||||
}
|
||||
16
package.json
16
package.json
@@ -8,16 +8,26 @@
|
||||
},
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"prebuild": "grunt clean:build",
|
||||
"build": "grunt build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kriffe/litegraph.js.git"
|
||||
"url": "git+https://github.com/jagenjo/litegraph.js.git"
|
||||
},
|
||||
"author": "jagenjo",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/kriffe/litegraph.js/issues"
|
||||
"url": "https://github.com/jagenjo/litegraph.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/kriffe/litegraph.js#readme"
|
||||
"homepage": "https://github.com/kriffe/litegraph.js#readme",
|
||||
"devDependencies": {
|
||||
"google-closure-compiler": "^20171112.0.0",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-closure-tools": "^1.0.0",
|
||||
"grunt-contrib-clean": "^1.1.0",
|
||||
"grunt-contrib-concat": "^1.0.1",
|
||||
"grunt-contrib-copy": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user