Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[⚠️ Needs testing]Feature/biotope element #79

Merged
merged 18 commits into from
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ language: node_js
node_js:
- "8"
- "9"
install: npm install -g yarn && yarn install
before_script: yarn run build
script: yarn run test:travis
install: npm install
before_script: npm run build
script: npm run test:travis
38 changes: 9 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,27 @@
### 1. Node.js and NPM

**Node.js** is a JavaScript runtime which will allow us to run a host of tools. In fact node.js even runs a tiny webserver which will enable you to browse the components of the frontend.
**NPM** is the Node Package Manager and is only used to install yarn.
**NPM** is the Node Package Manager and is used to install all packages.

1. Install as instructed on <http://nodejs.org>.
2. (On Windows if asked) choose to also install NPM and add Node.js to your path.
3. Check the installation of Node.js and NPM by running `node -v` or `npm -v` from your command line.

> IMPORTANT NOTE ON PERMISSIONS: If you experience permission problems while installing Node.js (especially on Mac or Linux machines) never use `sudo` to install packages with `npm` or `yarn`
> IMPORTANT NOTE ON PERMISSIONS: If you experience permission problems while installing Node.js (especially on Mac or Linux machines) never use `sudo` to install packages with `npm`
> Please ask your IT Admins to give you proper permissions or let them do the installation.
> See <https://docs.npmjs.com/getting-started/fixing-npm-permissions> for instructions.


### 2. yarn
**yarn** is a Node Package Manager which will allow us to download and install required components for Node.js with ease
See <https://yarnpkg.com/> for details of this dependency manager

1. Run `npm install -g yarn` to install yarn dependency manager
1a. (On windows) You can also get the installer from <https://yarnpkg.com/en/docs/install>.

## Starting

After your are finished with the step before and everything runs fine, run these steps to get your project on the road.

1. Open your command line / terminal / bash
2. Navigate to the project folder
3. Run `yarn install`
3. Run `npm install`
4. To
* **start** the development environment run `yarn start`
* **build** the code for production use run `yarn build`
* **start** the development environment run `npm start`
* **build** the code for production use run `npm run build`

## Custom Configuration

Expand Down Expand Up @@ -114,28 +107,15 @@ We use different boilerplates to keep our code structure as homogeneous as possi

### JavaScript / TypeScript

#### Plain jQuery Plugins

If you want to write your plugins with plain jQuery you can use the jQuery Plugin boilerplate.

The corresponding pattern file can be found in [/patterns/jquery.boilerplate.js](https://github.com/biotope/biotope-boilerplate/blob/develop/patterns/jquery.boilerplate.js).

#### jQuery TypeScript Plugins - Recommended

The standalone jQuery TypeScript Plugin is a TypeScript port of the legacy jQuery Plugin boilerplate.

The corresponding pattern file can be found in [/patterns/jquery.typescript.boilerplate.ts](https://github.com/biotope/biotope-boilerplate/blob/develop/patterns/jquery.typescript.boilerplate.ts).

It includes the same features as the legacy boilerplate but nicely enriched by lots of TypeScript features like type checking and code completion.
We also use the possibility to compile to ES5 or ES6. Depending on the projects browser matrix.
We also provide the possibility to compile to ES5 or ES6. Depending on the projects browser matrix.

### CSS / SASS

We compile the CSS stylesheets with a SASS compiler. We use the [BEM](http://getbem.com/naming/) methodology to ensure that the component based approach is also reflected in the css (sass) code we write.

## Development

run the boilerplate with `yarn start`
run the boilerplate with `npm start`

### 1. Our helpers

Expand Down Expand Up @@ -170,7 +150,7 @@ Each project specific helper should be prefixed with an abbreviation of the proj

## Build

run the boilerplate with `yarn build`
run the boilerplate with `npm run build`
If everything is correct, you will find a build version of your code in the **dist** directory.
This contains among others a min and concat version of your js and css files

Expand All @@ -193,5 +173,5 @@ To prevent this check the git config "core.autocrlf".

************** gulp(975,0x104c15000) malloc: *** error for object 0x10164201c: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug **************

This is caused by missing sass files. Be sure you've done a bower install before `yarn start`.
This is caused by missing sass files. Be sure you've done a bower install before `npm start`.

Loading