How to run existing meanjs project on mac pc? - macos

I have two meanjs projects created on my mac pc using terminal command prompt. One is New1 and another is Old1. but when I run command 'grunt' on terminal then only newly created New1 is running.
I am new at meanjs development that's why I don't know how to run my old meanjs projects on mac pc.
Can anyone help me?

It depends in the generator/scaffolder that you used. But for yeoman based projects exists the convention of use:
grunt serve: For development preview of the app with livereload.
grunt test: For test running.
grunt: For production build of the app.
With Projects managed by Gulp task runner it is the same but replacing grunt command with gulp command.

Well I think I have figured out my problem.
I need to point the directory to the expected project directory then need to run the 'grunt' command on terminal then the expected project will be started.

Related

Electron: Sharing the same project folder between macOS and Windows

Goal
I've read many Electron tutorials about app bootstrapping and build pipeline and had assumed that you could have a single project to handle a cross-platform action.
But after numerous failures in the packaging and build process, I finally realized that maybe my assumption is wrong.
Problem
Here is my desired workflow based on electron-forge:
1. Create app skeleton on Windows
yarn create electron-app my-app
cd my-app
yarn add my-dependency
yarn start
yarn make
This all went well. Now onto macOS
2. Transfer project to macOS for a ride
On macOS, running the app will lead to an error
cd my-app
yarn start
The error looks like this
$ yarn start
yarn run v1.22.4
$ electron-forge start
✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 1 / 1
✔ Launching Application
/path/to/my-app/node_modules/electron/dist/electron.exe: /path/to/my-app/node_modules/electron/dist/electron.exe: cannot execute binary file
error Command failed with exit code 126.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
So I blindly reinstall electron on macOS
yarn add electron
yarn start
yarn make
Things work fine on macOS.
Now back to Windows.
3. Travel back to Windows to double-check
This time. I got the similar problem as in Step #2. The Windows distribution now has the wrong Electron binary.
Findings
I found this file constantly getting overwritten even if I merge carefully when transferring project files between Windows and macOS.
my-app/node_modules/electron/path.txt
It contains a hardcoded path to Electron executable:
macOS
Electron.app/Contents/MacOS/Electron
Windows:
electron.exe
Workarounds
I could add pre-build steps against this by copying predefined metadata to the project folder depending on the current platform. But a hack like this sounds lame for a framework like Electron.
Question
So to me this metadata arrangement makes it difficult to share the same project between Windows and macOS. I can't imagine Electron developers working like this.
So What am I missing?
Basically, you shouldn't commit node_modules at all. Some post installation scripts may compile packages for a specific OS and the folder is usually huge.
Also, you shouldn't commit any result of a build, package or compile command. Typically, dist folders should be ignored.
Your repository should only contains code and configuration files.
The idea is that it makes no sense to commit these files and folders as you have all the required steps in order to reproduce the result on any machine: your windows computer, your macOS computer, your CI environment, etc. For example (these are pseudo-commands):
npm i or npm ci
npm run build
electron package
etc
So you should add all these folders to you .gitignore file:
# compiled output
/dist
/tmp
/out-tsc
/packages
# dependencies
/node_modules

How to create a exe file from an elixir project

I am new to elixir and I am trying to create a command line app for Windows. I would like to deploy the app as an exe file that can be run from command prompt. I would also like the end user to not be required to install erlang to run the app if possible.
I have looked everywhere on Google and found nothing that seemed to help. I have installed Rebar3 but I don't know if that is what I need or not.
EDIT: I am currently using escript to run the app but I still have to type "escript app_name [args]" and I want to just run it as "app_name [args]".
You can create a release with exrm. Include it in your app dependencies in your mix file and then you'll be able to do something like : MIX_ENV=prod mix do compile, release
It will generate a tarball that contains everything you need to run your app. Including a bat file to start it on windows. It might not be a exe as you requested in your question, but it's still easy to from windows CLI
you'll find more information in the Phoenix doc (most of it applies to elixir apps without phoenix): http://www.phoenixframework.org/docs/advanced-deployment

Android studio run lint from mac terminal

How can I run android lint from mac command ? I know how to run it from Android studio platform. But I have no idea to run it through gradle command line.
Thanks.
I'm not sure this is what you need but you can launch ./gradlew lint in the root directory of your project
Go to the root directory of your project.Then type ./gradlew lint
This works for me. Cheerz.

Grunt, Cordova & Windows Phone

I am developing an app for multiple platforms using Cordova. Grunt is used as a build tool. I use it to copy my source code to the right folder for each platform so I can develop them independently.
This works fine with Android using the scripts that are provided by Cordova. However, I have no idea if or how it is possible to automate the WP build process. I'm looking for two things:
Add all files in the www directory to the VS project (it does not include files that are not added to the project, which is sad).
Build, install and run the app in the emulator. I used adb & Grunt's exec for Android which was really simple, is there something similar for WP?
If you look in a cordova windows phone project there is a directory called 'cordova' which contains scripts to do all of this.
There should be scripts to build and run your project.
The run script can pretty much do it all. You can call it like :
run --device --release
or
run --emulator --debug
or just
run
A recent commit now makes it possible to use www\** in the .csproj file, which solved my first issue.

How to run Grunt tasks during Xcode build phase?

I am developing a web application, which includes GruntJS build tasks. I deploy it using Phonegap/Cordova in the Xcode IDE.
I would like to integrate the grunt build process into my Xcode project to simplify running the project. Ideally Xcode should run all the processes that I manually invoke using the Grunt CLI beforehand.
My Gruntfile.js lies within the root Xcode project directory. I have a local grunt install (0.4.0rc4) in node_modules and grunt-cli installed globally.
project
- multiple project dirs ...
- node_modules
- www-src
- www
project.xcodeproj
Gruntfile.js
I have tried adding a custom Run script - build phase to my Xcode project with a command as simple as "grunt" which returns "grunt: command not found" during build. Clearly more effort is needed to reference grunt and/or the proper target directory.
Nice setup Gregor :-) I had exact same setup for my previous project. Here is how I setup my custom script in Xcode Build Phases:
cd "${PROJECT_DIR}"
PATH=${PATH}:/usr/local/bin
grunt
Hope this helps you :-)

Resources