nativescript / nativescript-cli Goto Github PK
View Code? Open in Web Editor NEWCommand-line interface for building NativeScript apps
Home Page: https://www.npmjs.com/package/nativescript
License: Apache License 2.0
Command-line interface for building NativeScript apps
Home Page: https://www.npmjs.com/package/nativescript
License: Apache License 2.0
Implement before and after hooks for each command. Those should be scripts that will be loaded and executed before and after each command gets executed. We will need to have a set of default hooks and move our platform-specific files logic as such hook. Custom project hooks will live in the hooks folder of the project.
Current msg: No available platforms found
It should be something else (e.g "All available platforms are installed(added)")
Case 1: No platforms are added
Current:
$ tns platform list Available platforms: android No installed platforms found.
Expected:
$ tns platform list Available platforms for this OS: android No installed platforms found. Use $ tns platform add
Case 2: Platform is added, but the project is not prepared
Current:
$ tns platform list No available platforms found. Installed platforms: android
Expected:
$ tns platform list The project is not prepared for any platform Installed platforms: android
Case 3: Platform is prepared
Current:
$ tns platform list No available platforms found. Installed platforms: android
Expected:
$ tns platform list The project is prepared for: <platform> Installed platforms: android
Look at AppGyver Steroids for example.
Implement deploy command for all platforms. It should deploy the built application on all connected devices or emulators\simulators.
If the --device
option is specified it should deploy only to the connected devices.
If the --emulator
option is specific it should deploy only to the target emulator. If there is no running emulator it should be launched and then deployed to.
Implement platform update
command which will update the given platform to the latest (or specified) version.
isse
Android platform is already added and prepared.
$ tns platform list
Available platforms: undefined
Installed platforms: android
In order to install nativescript-cli installation on 64-bit Nodejs you need node-gyp, which has following prerequisites: https://github.com/TooTallNate/node-gyp
Exception msg: Cannot call method 'toLowerCase' of undefined
Execute: "$ tns create releaseConsole".
The console is release in maybe 10min (I assume that this is the terminal's built-in timeout)
it should be:
$ tns platform
Usage:
$ tns platform
is a related command that extends the platform command. You can run the following related commands:
list - Lists all available and installed platforms.
add - Creates a new platform specific project
{MIsssing} Remove - Removes the platform specific project
$ tns platform add [TAB][TAB]
- - - - -
at CommandDispatcher.completeCommand (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\lib\common\dispatchers.js:38:59)
at FiberFuture.Future.wait (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:415:10)
at FiberFuture.Future.wait (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:416:15)
at Function.settle (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:148:26)
at Object.complete (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\node_modules\tabtab\lib\completion.js:68:3)
at c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\lib\common\dispatchers.js:92:35
at c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\lib\common\services\commands-service.js:136:20
at completeCallback (c:\Users\tytodorov\AppData\Roaming\npm\node_modules\nativescript\lib\common\services\commands-service.js:108:34)
TypeError: undefined is not a function
Steps to reproduce:
Start one emulator and connect one real device
So that devices list looks like this:
$ adb devices
List of devices attached
device
emulator-5554 device
tns create TNS_Javascript
tns platform add android --path TNS_Javascript
tns prepare android --path TNS_Javascript
tns emulate android --emulator --path TNS_Javascript
Result:
BUILD SUCCESSFUL
Total time: 1 second
Project successfully built
Using /private/var/lib/jenkins/workspace/CLI-stable-tests-osx/TNS_Javascript/platforms/android/bin/TNS_Javascript-debug.apk
execFile: /private/var/lib/jenkins/workspace/CLI-stable-tests-osx/node_modules/nativescript/resources/platform-tools/android/darwin/adb devices
execFile: /private/var/lib/jenkins/workspace/CLI-stable-tests-osx/node_modules/nativescript/resources/platform-tools/android/darwin/adb devices
waiting for the emulator device to appear
spawn: /private/var/lib/jenkins/workspace/CLI-stable-tests-osx/node_modules/nativescript/resources/platform-tools/android/darwin/adb wait-for-device
Command /private/var/lib/jenkins/workspace/CLI-stable-tests-osx/node_modules/nativescript/resources/platform-tools/android/darwin/adb exited with code 1
Note: Everything works fine if real device is disconnected.
Both on Windows and OSX
executing $ tns create
should throw error message
./tns create TNS_JS
n
./tns platform add ios --path TNS_JS
Copying template files...
Installing tns-ios@<0.4.0
[email protected] TNS_JS/platforms/ios/node_modules/tns-ios
Installed tns-ios@<0.4.0
cp: no such file or directory: /Users/jzhekov/Desktop/Trash/tns-cli/node_modules/.bin/TNS_JS/platforms/ios/node_modules/.DS_Store/framework/*
ENOTDIR, open '/Users/jzhekov/Desktop/Trash/tns-cli/node_modules/.bin/TNS_JS/platforms/ios/node_modules/.DS_Store/package.json'
The .DS_Store
file is created by opening the TNS_JS/platforms/ios/node_modules/
in Finder.
For AppName we can use Cordova CLI rules.
For appid we should use the rules for the appropriate platforms.
Info
command should print more detailed information for project:
apilevel
for android)Log:
The following build commands failed:
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/Default-Landscape.png UnitTestApp/Resources/icons/Default-Landscape.png
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/[email protected] UnitTestApp/Resources/icons/[email protected]
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/[email protected] UnitTestApp/Resources/icons/[email protected]
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/Default-Portrait.png UnitTestApp/Resources/icons/Default-Portrait.png
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/[email protected] UnitTestApp/Resources/icons/[email protected]
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/Default.png UnitTestApp/Resources/icons/Default.png
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/[email protected] UnitTestApp/Resources/icons/[email protected]
CopyPNGFile /private/var/lib/jenkins/workspace/tns-modules-stable-build-unittests-ipa/UnitTestApp/platforms/ios/build/device/UnitTestApp.app/icon-40.png UnitTestApp/Resources/icons/icon-40.png
$ tns platform add android --frameworkPath tns-android-stable-latest.tgz --path CutenessIO
Copying template files...
Installing tns-android-stable-latest.tgz
[email protected] CutenessIO/platforms/android/node_modules/tns-android
Installed tns-android-stable-latest.tgz
cp: no such file or directory: /private/var/lib/jenkins/workspace/CutenessIO/platforms/android/node_modules/tns-android/framework/gen
cp: no such file or directory: /private/var/lib/jenkins/workspace/CutenessIO/platforms/android/node_modules/tns-android/framework/.project
sed: no such file or directory: /private/var/lib/jenkins/workspace/CutenessIO/platforms/android/.project
When install Nativescript CLI on Linux user has no execute permissions on node_modules/nativescript/resources/platform-tools/android/linux/adb
This leads to issues with some of the Nativescript CLI commands.
Workaround:
After Nativescript CLI installation run this command:
chmod u+x node_modules/nativescript/resources/platform-tools/android/linux/adb
Here is what happens when I try to prepare ios:
$ node_modules/.bin/tns prepare ios --path UnitTestApp
cp: copyFileSync: could not write to dest file (code=ENOENT):/private/var/lib/jenkins/workspace/CLI-stable-tests-osx/UnitTestApp/platforms/ios/UnitTestApp/Resources/icons
Project successfully prepared
allow syntax like tns platform add --path ./MyProject/MyProject tns-ios-0.2.0-a-custombuild.tgz
Exception msg: Cannot call method 'toLowerCase' of undefined
Corresponding to the milestone
Xcode: Version 5.0.2 (5A3005)
TYTODOROVMAC:kolcho tytodorov$ tns platform add ios --log trace
Starting watch on killswitch /Users/tytodorov/.nativescript-cli/KillSwitches/cli
Looking for project in '/Users/tytodorov/nativeclitest/kolcho'
Project directory is '/Users/tytodorov/nativeclitest/kolcho'.
exec: which xcodebuild
exec: xcodebuild -version | head -n 1 | sed -e 's/Xcode //'
Version strings are not in the same format
Usage:
$ tns platform add
Platform-specific usage:
$ tns platform add android
$ tns platform add ios
Creates a new platform specific project. In this version of Telerik NativeScript you can create only ios and android projects.
You can create Android projects on windows and Mac machine. You can create ios projects only on Mac machine.
The tns platform --help
command only displays the list
and add
subcommands. It should display the remove
subcommand as well.
Description:
'tns run android --emulator' does not work if emulator is not started before that
Expected:
'tns run android --emulator' should start new emulator if emulator is not running
Steps to reproduce:
tns create TNSApp
tns platform add andorid --path TNSApp
tns prepare android --path TNSApp
tns run android --emulator --path TNSApp
Android emulator is not started, last command does not finish, output is:
BUILD SUCCESSFUL
Total time: 4 seconds
Project successfully built
Using c:\Workspaces\cli-tests\TNSApp\platforms\android\bin\TNSApp-debug.apk
Starting Android emulator with image true
More Details:
In task manager I see that "adb wait-for-device" is running
Found on Windows 8.1
Workaround:
Start some existing avd before 'tns run android --emulator --path TNSApp' command and it will deploy and run the app successfully.
Case 1:
This command:
"tns deploy android --device fakeDevice --path TNS_Javascript"
returns following error:
Cannot resolve the specified connected device by the provided index or identifier. To list currently connected devices and verify that the specified index or identifier exists, run 'appbuilder device'.
'appbuilder device' is wrong, it should be replaced with 'tns list-devices'
Case 2:
When all Android devices are disconnected and you call "tns list-devices android" then you see:
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again
Then message does not end with '.'.
Hello, I think it would be nice if you supported Node.js apis out of the box so that you could easily share all the modules that exist in the npm ecosystem.
Integrate Telerik Analytics.
Test
Wrong issue submission
Research how would we react to the iOS8 release.
We may need to support versioning (e.g. builds for iOS7.0 or iOS8.0)
We may need to support two versions of xcode during the migration from iOS7 to iOS8.
The iOS runtime should support iOS8, do we need two builds of the runtime?
Now, the build process can fail if the installed platform bridge is older than the current version in the npm registry. We should always update to the latest version
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.