Comments (11)
Hi, do you have any suggestion on how to do it?
Also, I'd be nice if you could elaborate a little more about your need, I didn't get the specifics.
from electrify.
@arboleya he wants to add some extra commands ( like a makefile would do ) after the build, probably before the app is launched
@AlexFrazer would a makefile help you out?
#makefile
my_custom_build:
echo 'do something'
echo 'do somthing else'
then execute
make my_custom_build
from electrify.
yeah pretty much. For example,
var pwd = path.resolve('.');
var build = path.join(pwd, 'meteor/.electron/.dist');
bundle:
echo('electrifying app');
electrify();
echo('Copying icon');
cp(path.join(pwd, 'meteor/public/favicon.ico'), path.join(build, 'resources/atom.icns'));
from electrify.
@AlexFrazer can't you do that now?
just using a makefile or executing a shell command "electrify" ?
from electrify.
I am having trouble executing the shell command "electrify". It seems to be a very odd process to manage in a build find.
Opening meteor, then opening meteor shell, then passing the command "electrify" isn't intuitive in an automated system, at least.
Can the npm package just include some bundling functionality?
var electrify = require('electrify');
target.bundle = function () {
var METEOR = path.join(__dirname, 'meteor');
electrify.bundle(METEOR);
}
from electrify.
@AlexFrazer agreed on the meteor shell thing, but maybe there is a way of making this one-liner and i'm not aware.. maybe @arboleya has knows workaround for this?
from electrify.
I have a workaround but it's not really the best...
Meteor.startup(function () {
if (process.env.ELECTRIFY) {
this.electrify();
process.exit(0);
}
});
Then in makefile:
target.bundle = function () {
return exec('ELECTRIFY=true meteor --once');
}
just not exactly very friendly to do it that way
from electrify.
@hems @AlexFrazer I thought you wanted to put something in the middle of the build system, but actually you want a post build
thing.
Yes, it is a little odd and surely hard to automate. But not that hard.
At first I wanted a custom Meteor command such as meteor release electrify
or something like that, there is a way to have custom commands, but it felt too complicated and nonsense.
As for the NPM package, currently it's needed only by the Electron application for the boot process, not for the Meteor package itself. As I wanted to have the Meteor thing completely independent from local NodeJS or global Npm packages, I ended up executing Meteor's server code through the interactive meteor shell
, which was the only way I found.
Your workaround sounds reasonable but it looks like it doesn't work on windows, right?
Another approach would be to spawn meteor
, then spawn meteor shell
and manipulate the stdin
and stdout
to type electrify
in the meteor shell and then send a SIGINT
signal, something like that.
I'm redesigning things to accommodate plugins, I'll revisit this question in time, for sure.
I agree it's odd not to have a simple command
to build the whole thing.
from electrify.
@AlexFrazer Here it is: https://github.com/arboleya/electrify#npm-way
from electrify.
from electrify.
Thank you good sir!
from electrify.
Related Issues (20)
- Using --icon when packaging HOT 2
- Method was not defined HOT 1
- Dependencies path length too long in Windows HOT 2
- Issue starting mongod - default storage engine not available HOT 18
- convert from webapp to desktop HOT 3
- Defining methods causes the app to crash HOT 1
- Setting system environment variables before meteor app is started. HOT 2
- Try to package starting example of meteor HOT 4
- How do I build debian package from generated app?
- App size grows with every run of electrify by about 400 MB (MacOS) HOT 1
- my-electrified-app.exe can not start
- No way to pass in --server option? HOT 1
- alternative solution -> meteor-desktop HOT 1
- How-to allow localhost:3000 in package ? HOT 1
- App does not render when packaged - Windows 10 x64 - WinXP x32 HOT 2
- electrify:meteor:index@client: cannot initialize connection. Did you `npm install -g electrify`?
- Error: EPERM: operation not permitted, rename 'C:\Users\username\AppData\Local\Temp\electrify\package' -> 'C:\appname\.electrify\.dist' HOT 1
- show error : core.require HOT 1
- Don't let this die... HOT 2
- Issue starting mongod HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrify.