Commit e14c2fb1 authored by Sebastian Biewer's avatar Sebastian Biewer

Switching to a self-installing package, that can be required by other modules

parent 99546de9
......@@ -2,11 +2,8 @@ Editor.esproj/*
*.swp
*.sh
node_modules/CCS/*.js
node_modules/PseuCo/*.js
node_modules/CCSCompiler/*.js
spec/node_modules/*
node_modules
lib
temporary_files
htdocs/*.js
_UI.js
*.DS_Store
/* global module:false */
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
CCS: {
src: [
'temporary_files/CCSParser.js',
'temporary_files/CCS_no_parser.js'
],
dest: 'temporary_files/CCS.js',
nonull: true
},
PseuCo: {
src: [
'temporary_files/PseuCoParser.js',
'temporary_files/PseuCo_no_parser.js'
],
dest: 'temporary_files/PseuCo.js',
nonull: true
}
},
clean: {
tmpbuild: ['temporary_files/build/'],
build: ['build/'],
oldbuild: ['temporary_files/old_build'],
tmp: ['temporary_files/']
},
peg: {
CCS: {
src: 'CCSParser.pegjs',
dest: 'temporary_files/CCSParser.js',
options: {
exportVar: 'CCSParser'
}
},
PseuCo: {
src: 'PseuCoParser.pegjs',
dest: 'temporary_files/PseuCoParser.js',
options: {
exportVar: 'PseuCoParser'
}
}
},
coffee: {
CCS: {
options: {
bare: true
},
files: {
'temporary_files/CCS_no_parser.js': ['CCS.coffee', 'CCSRules.coffee', 'CCSExport.coffee']
}
},
PseuCo: {
options: {
bare: true
},
files: {
'temporary_files/PseuCo_no_parser.js': ['PseuCo.coffee', 'PCType.coffee', 'PCEnvironment.coffee', 'PCExport.coffee']
}
},
CCSCompiler: {
options: {
bare: true
},
files: {
'temporary_files/CCSCompiler.js': ['PCCCompiler.coffee', 'PCCProcessFrame.coffee', 'PCCProgramController.coffee', 'PCCContainer.coffee', 'PCCCompilerStack.coffee', 'PseuCo+Compiler.coffee', 'PCCExport.coffee']
}
}
},
rename: {
build: {
files: [
{
src: 'temporary_files/CCS.js',
dest: 'lib/CCS.js'
},
{
src: 'temporary_files/PseuCo.js',
dest: 'lib/PseuCo.js'
},
{
src: 'temporary_files/CCSCompiler.js',
dest: 'lib/CCSCompiler.js'
}
]
}
},
mkdir: {
bin: {
options: {
create: ['lib']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-peg');
grunt.loadNpmTasks('grunt-contrib-rename');
grunt.loadNpmTasks('grunt-mkdir');
grunt.registerTask('build', [
'peg',
'coffee',
'concat:CCS',
'concat:PseuCo',
'clean:oldbuild',
'mkdir:bin',
'rename:build'
]);
grunt.registerTask('default', ['build']);
};
\ No newline at end of file
......@@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
You start the compilation process by creating a new PCCCompiler object with the node of your PseuCo tree and call compile() on it. You'll get a CCS tree on success
###
PC = require "PseuCo"
CCS = require "CCS"
PC = require "./PseuCo.js"
CCS = require "./CCS.js"
PCCFlags =
trackGlobalVariables: 1
......
module.exports.CCS = require('./lib/CCS.js');
module.exports.PseuCo = require('./lib/PseuCo.js');
module.exports.Compiler = require('./lib/CCSCompiler.js')
This diff is collapsed.
......@@ -2,14 +2,27 @@
"name": "pseuco-ccs-compiler",
"version": "0.7.21",
"description": "pseuCo to CCS Compiler",
"main": "htdocs/index.html",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://dgit.cs.uni-saarland.de:2222/pseuco/pseuco-ccs-compiler.git"
},
"author": "Sebastian Biewer",
"license": "see Readme file",
"license": "GPL-3.0",
"bugs": {
"url": "https://dgit.cs.uni-saarland.de/pseuco/pseuco-ccs-compiler/issues"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-coffee": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-rename": "^0.2.0",
"grunt-eslint": "^20.1.0",
"grunt-mkdir": "^1.0.0",
"grunt-peg": "^2.0.1"
},
"scripts": {
"install": "grunt"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment