All Projects → manekinekko → angular-library-starter

manekinekko / angular-library-starter

Licence: other
🎩 A Minimalist Starter for Angular (v2+) libraries (w/ AOT support)

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to angular-library-starter

starter-kit
🏃 A simple and powerful Starter Kit made with Webpack, Gulp 4, Pug and SASS
Stars: ✭ 21 (-70.42%)
Mutual labels:  starter
twitch-extension-starter
Kickstarts your Twitch Extension using React
Stars: ✭ 38 (-46.48%)
Mutual labels:  starter
vividus-starter
VIVIDUS-based test project template
Stars: ✭ 43 (-39.44%)
Mutual labels:  starter
react-redux-nextjs-bootstrap-starter
next + react + redux + bootstrap starter
Stars: ✭ 24 (-66.2%)
Mutual labels:  starter
create-next-stack
Create Next Stack is a website and CLI tool used to easily set up the boilerplate of new Next.js apps.
Stars: ✭ 149 (+109.86%)
Mutual labels:  starter
vital
Starter template for Vite with React (TypeScript). Supports Tailwind with CSS-Modules. Jest and @react/testing-library configured and ready to go. Also ESLint, Prettier, Husky, Commit-lint and Atomic Design for components.
Stars: ✭ 151 (+112.68%)
Mutual labels:  starter
vue-auth-boilerplate
This is a simple Vue template/starter kit, scaffolded on vue-cli 3, with full Auth functions to Login & Register
Stars: ✭ 77 (+8.45%)
Mutual labels:  starter
Larabye
🎉 Larabye (Laravel + Rockabye) is a mini PHP starter / framework inspired from laravel features
Stars: ✭ 31 (-56.34%)
Mutual labels:  starter
gatsbyjs-starter-tailwindplay
GatsbyJS Tailwind Starter - TailwindPlay
Stars: ✭ 69 (-2.82%)
Mutual labels:  starter
material2-admin
Angular - Material2 - Redux - Flex - Admin Example - Starter
Stars: ✭ 13 (-81.69%)
Mutual labels:  starter
nextjs-landing-starter
Build your landing site based on Next.JS in minutes 🚀
Stars: ✭ 59 (-16.9%)
Mutual labels:  starter
playground-for-beaver-themer
Simple bare-bone WordPress theme for Beaver Themer plugin.
Stars: ✭ 16 (-77.46%)
Mutual labels:  starter
frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (-66.2%)
Mutual labels:  starter
spring-boot-starter-smpp
Spring boot starter to send SMS via SMPP
Stars: ✭ 25 (-64.79%)
Mutual labels:  starter
node-red-node-typescript-starter
🏁 Quick-start template repository for creating new Node-RED node sets in TypeScript.
Stars: ✭ 64 (-9.86%)
Mutual labels:  starter
nextjs-semantic
Next.js + Fomantic-UI + Styled Components
Stars: ✭ 68 (-4.23%)
Mutual labels:  starter
browser-extension
Browser Extension Template with ESbuild builds, support for React, Preact, Typescript, Tailwind, Manifest V3/V2 support and multi browser build including Chrome, Firefox, Safari, Edge, Brave.
Stars: ✭ 535 (+653.52%)
Mutual labels:  starter
netlify-cms-widget-starter
A boilerplate for creating Netlify CMS widgets.
Stars: ✭ 74 (+4.23%)
Mutual labels:  starter
sass-starter-pack
Sass starter files using Gulp v4.0.0 🔥
Stars: ✭ 34 (-52.11%)
Mutual labels:  starter
create-react-app-starter
CRA + typeless starter
Stars: ✭ 21 (-70.42%)
Mutual labels:  starter

Build status CircleCI

Due to the limited time on our planet Earth (24 hours a day is too short!), I'm sadly not supporting this project anymore. Please use Jurgen's Yeoman generator.






🎩 Minimalist Angular Library Starter

This is a minimalist starter if you need to (quickly) create and ship a library for your Angular (v2+) applications.

Most Important Files

package.json

{
    "name": "@manekinekko/angular-library-starter",
    "version": "1.0.0",
    "main": "dist/index.js",
    "types": "dist/index.d.ts",
    "private": false,
    "scripts": {
        "build:aot": "ngc -p tsconfig.json",
    },
    //...
}

tsconfig.json

{
    "compilerOptions": {
        "target": "es5",
        "module": "es2015",
        "moduleResolution": "node",
        "declaration": true,
        "noImplicitAny": false,
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "skipLibCheck": true,
        "typeRoots": ["./node_modules/@types"],
        "types": ["node"],
        "lib": ["dom", "es2015"]
    },
    
    // this is for the AOT compiler
    "angularCompilerOptions": {
        "genDir": "tmp",
        "entryModule": "src/lib/app.module#AppModule"
    },
    //...
}

Using you library in another project

yarn or npm it in your package.json

"dependencies": {
  "@angular/common": "^2.3.1",
  "@angular/compiler": "^2.3.1",
  "@angular/core": "^2.3.1",
  //...
  "@manekinekko/angular-library-starter": "^1.0.0",
},
//...

import the AppModule from the library

import { NgModule } from '@angular/core';
import { AppModule } from '@manekinekko/angular-library-starter';

@NgModule({
  imports: [
    AppModule.forRoot()
  ],
  //...
})
export class AppModule { }

use it anywhere in your NgModules

import { Component } from '@angular/core';
import { AppService } from '@manekinekko/angular-library-starter';

// AppService and AppPipe are imported by the AppModule

@Component({
  selector: 'app-root',
  template: `
   {{ text | truncate }}
   <angular-library-component></angular-library-component>
  `
})
export class AppComponent {
  text = 'Lorem ipsum dolor sit amet';
  constructor(as: AppService) {
    this.date = as.getDate().toString();
  }
}

Custom types

If you have custom typings you want to include in your project, use the custom-typings.d.ts for that purpose.

Disclaimers

  1. This starter contains the minimum configuration for your library so it can be shared and used across other projects.
  2. Tests are not included in this starter!
  3. This starter is not compatible with the angular-cli YET.

Have a PR?

All contributions are welcome ;)

License

The MIT License (MIT) Copyright (c) 2017 - Wassim CHEGHAM

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].