mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 05:46:03 +00:00
emizzle
f1206b4cb9
fix(@embark/core): Fix
—template
URL support
Support for all template URL syntax as spec’d in https://our.status.im/embark-3-2-much-more-than-a-moonshot/ (Everyone Gets A Template section). Unit tests were added for all missing cases. | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 1a. Normal React template, no URL | `embark new 1-normal-template-react --template react` | No | see below | ``` Installing template from https://github.com/embark-framework/embark-react-template/tree/4.0 Downloading template... Download failed, response code 404 Retrying with the default branch... It may not be compatible with your Embark version 4.0.0-alpha.2 Installing template from https://github.com/embark-framework/embark-react-template Downloading template... Download failed, response code 404 Does the template really exist? Embark's supported templates: https://embark.status.im/templates/ ``` **Failure reason**: https://github.com/embark-framework/embark-react-template repo doesn't exist | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 1b. Normal TypeScript template, no URL | `embark new 1-normal-template-typescript --template typescript` | Yes | see below | ``` Installing template from https://github.com/embark-framework/embark-typescript-template/tree/4.0 Downloading template... Download failed, response code 404 Retrying with the default branch... It may not be compatible with your Embark version 4.0.0-alpha.2 Installing template from https://github.com/embark-framework/embark-typescript-template Downloading template... Installing packages... Init complete App ready at 1-normal-template-typescript ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 1c. Normal Vyper template, no URL | `embark new 1-normal-template-vyper --template vyper` | Yes |see below | ``` Installing template from https://github.com/embark-framework/embark-vyper-template/tree/4.0 Downloading template... Download failed, response code 404 Retrying with the default branch... It may not be compatible with your Embark version 4.0.0-alpha.2 Installing template from https://github.com/embark-framework/embark-vyper-template Downloading template... Installing packages... Init complete App ready at 1-normal-template-vyper ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 1d. Normal Vue.js template, no URL | `embark new 1-normal-template-vue --template vue` | Yes |see below| ``` Installing template from https://github.com/embark-framework/embark-vue-template/tree/4.0 Downloading template... Download failed, response code 404 Retrying with the default branch... It may not be compatible with your Embark version 4.0.0-alpha.2 Installing template from https://github.com/embark-framework/embark-vue-template Downloading template... Installing packages... Init complete App ready at 1-normal-template-vue ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 1e. Normal Bamboo template, no URL | `embark new 1-normal-template-bamboo --template bamboo` | Yes |see below| ``` Installing template from https://github.com/embark-framework/embark-bamboo-template/tree/4.0 Downloading template... Download failed, response code 404 Retrying with the default branch... It may not be compatible with your Embark version 4.0.0-alpha.2 Installing template from https://github.com/embark-framework/embark-bamboo-template Downloading template... Installing packages... Init complete App ready at 1-normal-template-bamboo ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 2. Github repo download | `embark new 2-github-repo --template status-im/dreddit-devcon` | Yes |see below| ``` Installing template from https://github.com/status-im/dreddit-devcon Downloading template... Installing packages... Init complete App ready at 2-github-repo ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 3a. Github template with non-existant branch | `embark new 3-github-branch --template status-im/dreddit-devcon#start-here` | Yes | ``` Installing template from https://github.com/status-im/dreddit-devcon/tree/start-here Downloading template... Download failed, response code 404 Does the template really exist? ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 3b. Github template with other branch | `embark new 3-github-branch --template status-im/dreddit-devcon#start` | Yes |see below| ``` Installing template from https://github.com/status-im/dreddit-devcon/tree/start Downloading template... Installing packages... Init complete App ready at 3-github-branch ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 4. Github download with git url | `embark new 4-github-git-url --template git@github.com/status-im/dreddit-devcon` | No |see below| ``` Unsupported template name or git host URL ``` **Failure reason:** Incorrect syntax. Repo owner need to postfix the host, ie `git@github.com:status-im/dreddit-devcon`. Fixed in this PR. | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 5. Github download with https url | `embark new 5-github-https-url --template https://github.com/status-im/dappcon-workshop-dapp` | Yes |see below| ``` Installing template from https://github.com/status-im/dappcon-workshop-dapp Downloading template... Installing packages... Init complete App ready at 5-github-https-url ``` | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 6. Github download with no protocol | `embark new 6-github-url-no-protocol --template github.com/status-im/dappcon-workshop-dapp` | No |see below| ``` Unsupported template name or git host URL ``` **Failure reason:** Incorrect syntax. Can remove the github host, ie `status-im/dappcon-workshop-dapp`. Fixed in this PR. | Test case | Command | Successful? | Output | | :----------------------------------------- | :--------------------------------------------------------- | :---: | :-------- | | 7. Github repo with no branch, and a default branch that is not `master` | `embark new 7-github-default-branch-not-master --template status-im/dreddit-devcon` | Yes |see below| ``` Installing template from https://github.com/status-im/dreddit-devcon Downloading template... Installing packages... Init complete App ready at 7-github-default-branch-not-master ``` Update replacements for less variance Update URL replacements for less result variance if the `hosted-git-info` library were to change it’s functionality. Move replacements to a constant. Add unit test for additional `bitbucket.org/gitlab.com` URL shortcuts.
What is Embark
Embark is a framework that allows you to easily develop and deploy Decentralized Applications (DApps).
A Decentralized Application is a serverless html5 application that uses one or more decentralized technologies.
Embark currently integrates with EVM blockchains (Ethereum), Decentralized Storages (IPFS), and Decentralized communication platforms (Whisper and Orbit). Swarm is supported for deployment.
With Embark you can:
Blockchain (Ethereum)
- Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
- Contracts are available in JS with Promises.
- Do Test Driven Development with Contracts using Javascript.
- Keep track of deployed contracts; deploy only when truly needed.
- Manage different chains (e.g testnet, private net, livenet)
- Easily manage complex systems of interdependent contracts.
Decentralized Storage (IPFS, Swarm)
- Easily Store & Retrieve Data on the DApp through EmbarkJS. Including uploading and retrieving files.
- Deploy the full application to IPFS or Swarm.
- Import and deploy contracts hosted on Swarm.
Decentralized Communication (Whisper, Orbit)
- Easily send/receive messages through channels in P2P through Whisper or Orbit.
Web Technologies
- Integrate with any web technology including React, Foundation, etc..
- Use any build pipeline or tool you wish, including grunt, gulp and webpack.
$ npm -g install embark
Description
Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
https://framework.embarklabs.io/
Languages
JavaScript
73.9%
TypeScript
14%
CSS
8%
HTML
4.1%