Git Product home page Git Product logo

cozy-template's Introduction

Cozy Template

⚠️ This repo is deprecated. Prefer to use https://github.com/cpatchane/cozy-create-app ⚠️

What's Cozy?

Cozy Logo

Cozy is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.

What's cozy-template?

This repository is a client-side app skeleton for Cozy Cloudv3. We keep it up-to-date with our habits and best-practices. It allow you to bootstrap an app from scratch in a breeze.

Use it

Step 1: clone the app

$ git clone \
  --origin=template \
  --depth=1 \
  https://github.com/cozy/cozy-template.git \
  my-app

Step 2: customize templates resources

The my-app/.templates dir contains some templates you can use in your final repository. You should copy them to the root of your project (excepted the .transifexrc file). Be careful that those files contains some vars you must replace to have the files fully functional:

  • <APP_NAME>: the application name
  • <APP_SHORT_DESCRIPTION>: a quick app description
  • <APP_CATEGORY>: the app category (used in the cozy-bar apps navigation)
  • <APP_MAINTAINER>: Github main maintainer username (don't forget @ :))
  • <SLUG_TX>: transifex app slug
  • <SLUG_GH>: Github repository slug
  • <SLUG_NPM>: NPM slug
  • <USERNAME_GH>: Github username

Don't forget to update your LICENSE too if needed.

⚠️ Concerning the application category, for now just cozy and partners are handled. Other categories will be handled soon, for now, you can let this field blank, it will be in the others category. If a category is empty, missing or not recognized, it will be others by default.

Step 3: add your own repository

Go to https://github.com/new and create a new repository for your app. Then add it to your app:

$ git remote add \
  origin \
  https://github.com/<USERNAME_GH>/<SLUG_GH>.git
$ git commit -am "Initial commit for my-app"
$ git push -u origin master:master

That's it 🚀!

Congrats! Your app is now fully set. You can start coding in src, and run it through a cozy-stack.

You can find more informations about how to bootstrap a Cozy app in the Cozy's app bootstrapv3 talk.

Community

Maintainer

The lead maintainer for cozy-template and tooling is @m4dz, send him a 🍻 to say hello!

Get in touch

You can reach the Cozy Community by:

License

cozy-template is developed by Cozy Cloud and distributed under the AGPL v3 license.

cozy-template's People

Contributors

cpatchane avatar enguerran avatar goldoraf avatar gooz avatar gregorylegarec avatar kosssi avatar lespacedunmatin avatar m4dz avatar nono avatar paultranvan avatar ptbrowne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cozy-template's Issues

Abstract npm scripts into cozy-cli ?

We now have several apps that share a common set of scripts. This shared logic is difficult to keep coherent between the apps.

Maybe a CLI cozy could help with that.

cozy build
cozy deploy
cozy watch

Is there any inconvenient I do not see ?

Sample package.json.scripts

{
    "build": "npm run build:browser",
    "build:browser": "NODE_ENV=browser:production npm run commons:build",
    "build:mobile": "NODE_ENV=mobile:production npm run commons:build",
    "clean:browser": "rm -rf build/*",
    "clean:mobile": "rm -rf mobile/www/*",
    "commons:build": "webpack --config webpack.config.js --bail",
    "commons:watch": "webpack --config webpack.config.js --watch --display-modules --display-chunks",
    "commons:watch:standalone": "webpack-dev-server --config webpack.config.js --display-modules --display-chunks --inline --hot",
    "deploy": "git-directory-deploy --username Cozy --email [email protected] --directory build/ --repo=https://[email protected]/<USERNAME_GH>/<SLUG_GH>.git",
    "tx": "tx pull --all || true",
    "precommons:build": "npm-run-all lint tx",
    "prebuild:browser": "npm run clean:browser",
    "prebuild:mobile": "npm run clean:mobile",
    "pretest": "npm run lint",
    "prewatch:browser": "npm run clean:browser",
    "prewatch:mobile": "npm run clean:mobile",
    "lint": "npm-run-all --parallel 'lint:*'",
    "lint:js": "eslint 'src/**/*.js' 'src/**/*.jsx' 'test/**/*.js' 'mobile/src/**/*.js' 'mobile/src/**/*.jsx' 'mobile/test/**/*.js'",
    "lint:styles": "stylint src/styles --config ./.stylintrc",
    "stack:docker": "docker run --rm -it -p 8080:8080 -v \"$(pwd)/build\":/data/cozy-app/app cozy/cozy-app-dev",
    "test": "node --harmony_proxies node_modules/.bin/jest",
    "watch": "npm run watch:browser",
    "watch:browser": "NODE_ENV=browser:development npm run commons:watch",
    "watch:mobile": "NODE_ENV=mobile:development npm run commons:watch",
    "watch:browser:standalone": "NODE_ENV=browser:development npm run commons:watch:standalone",
    "watch:mobile:standalone": "NODE_ENV=mobile:development npm run commons:watch:standalone",
    "watch:standalone": "npm run watch:browser:standalone",
    "android:run": "cd mobile ; cordova run android --device ; cd ..",
    "android:run:emulator": "cd mobile ; cordova run android --emulator ; cd ..",
    "android:release": "npm run build:mobile && cd mobile ; cordova build android --release ; cd ..",
    "android:signed": "npm run android:release && cd mobile ; apksigner sign --ks keys/android/<APP_NAME>-release-key.jks --out build/android/<APP_NAME>.apk platforms/android/build/outputs/apk/android-release-unsigned.apk ; cd ..",
    "android:publish": "npm run android:signed && cd mobile ; fastlane supply ; cd ..",
    "ios:run": "cd mobile ; cordova run ios --device ; cd ..",
    "ios:run:emulator": "cd mobile ; cordova run ios --emulator ; cd .."
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.