Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ember-cli-github-pages
Advanced tools
If you need to throw up a quick example of your addon in action, this is the addon for you!
This addon provides new command(s) to help manage a gh-pages branch for your addon. It's an addon for addons.
First you need to install ember-cli-github-pages:
ember install ember-cli-github-pages
Upon install, this addon will modify your 'tests/dummy/config/environment.js'. Commit these changes with the following command:
git add -A && git commit -m "Added ember-cli-github-pages addon"
Then you need to create the gh-pages
branch and remove the unnecessary files:
git checkout --orphan gh-pages && rm -rf `bash -c "ls -a | grep -vE '\.gitignore|\.git|node_modules|bower_components|(^[.]{1,2}/?$)'"` && touch .gitkeep && git add -A && git commit -m "initial gh-pages commit"
Once that's done, you can checkout the branch you want to create the gh-page from (likely master) and run the command to build and commit it.
Then run ember github-pages:commit --message "some commit message" in order to rebuild gh-pages branch.
git checkout master
ember github-pages:commit --message "Initial gh-pages release"
Once you've created a gh-pages branch, tell the world! Add a demoURL
key to the ember-addon
object in your package.json
. See the ember-cli
documention for details.
While in general, github repo pages will serve the content in the gh-pages
branch, org and user pages serve content in the master
branch. When using this addon to develop a Org or User page, edit your Ember Application on an alternate branch such as ember
. Once you are ready to build the application and send to GitHub you can either:
--branch master
option to the ember github-pages:commit
commandgh-pages
branch on your local machine track the master branch on origin
via the command:git branch --set-upstream gh-pages origin/master
ember new myBlog
. Replace myBlog
with the name of your project.cd myBlog && ember install ember-cli-github-pages
.environment.js
, as they are not required for Org/User pages: git checkout -- tests/dummy/config/environment.js
git add -A && git commit -m "Added ember-cli-github-pages addon https://github.com/poetic/ember-cli-github-pages"
ember
which will store all the ember related code: git checkout -b ember
git checkout master && rm -rf `ls -a | grep -vE '\.gitignore|\.git|node_modules|bower_components|(^[.]{1,2}/?$)'` && git add -A && git commit -m "initialises gh-pages(in case of organisation master) commit"
git checkout ember
;ember github-pages:commit --branch master --message "adds base site"
git remote add origin https://github.com/knoxxs/knoxxs.github.io.git
. Here knoxxs
is my username.git push -u origin master
.http://knoxxs.github.io/
.You may optionally specify an ember build environment and a branch name as parameters
git checkout master
ember github-pages:commit --message "Initial demo app release" \
--branch="my-demo-app" \
--environment=development
Optional Argument | Default Value | Description |
---|---|---|
environment | production | Ember build environment (i.e., development , production ) |
branch | gh-pages | Branch to commit your app to |
destination | . | The directory into which the built application should be copied |
message | new gh-pages version | The commit message to include with the build, must be wrapped in quotes |
You will still need to push the gh-pages branch up to github using git. Once you
do that you can access the repo at http://username.github.io/repo-name
. It may
take a few minutes after pushing the code to show up.
For ease of use you can add the following to your package.json
:
"scripts": {
"deploy": "ember build --environment production && ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\" && git push origin gh-pages:gh-pages"
}
And then you can execute npm run deploy
and it will deploy with a commit message that references the commit ID you deployed from, and push that branch to github.
This addon creates a production build, which fingerprints resources automatically. If you have dynamic resources in your templates, they will not be fingerprinted, so you need to ignore the fingerprinting for those resources in your ember-cli-build.js file. See the fingerprinting docs.
We are very thankful for our many contributors
FAQs
Easily manage gh-pages of your ember-cli addon
The npm package ember-cli-github-pages receives a total of 1,977 weekly downloads. As such, ember-cli-github-pages popularity was classified as popular.
We found that ember-cli-github-pages demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.