Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Rapidly build modern applications with advanced configuration management

License

NotificationsYou must be signed in to change notification settings

projen/projen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

projen

Define and maintain complex project configuration through code.

Documentation ·Changelog ·Project types ·Join the community

Apache 2.0 LicenseGitpod ready-to-codeRelease badgeCommit activity


projen synthesizes project configuration files such aspackage.json,tsconfig.json,.gitignore, GitHub Workflows, eslint, jest, etc. from awell-typed definition written in JavaScript.

As opposed to existing templating/scaffolding tools,projen is not a one-offgenerator. Synthesized files should never be manually edited (in fact, projenenforces that). To modify your project setup, users interact with richstrongly-typed class and executeprojen to update their project configurationfiles.

By defining a custom project type and using projen in multiple repositories, it'spossible to update configuration files and CI/CD workflows across dozens (orhundreds!?) of projects.

Check outthis talk about projen from its creator.

Getting Started

projen doesn't need to be installed. You will be usingnpx to runprojen which takes care of all required setup steps.

To create a new project, run the following command and follow the instructions:

$mkdir my-project$cd my-project$npx projen new PROJECT-TYPE🤖 Synthesizing project......

Project types

Currently supported project types (usenpx projen new without a type for afull list):

Built-in: (runnpx projen new <type>)

External: (runnpx projen new --from <type>)

Usenpx projen new PROJECT-TYPE --help to view a list of command lineswitches that allows you to specify most project options during bootstrapping.For example:npx projen new jsii --author-name "Jerry Berry".

Thenew command will create a.projenrc.js file which looks like this forjsii projects:

const{ JsiiProject}=require('projen');constproject=newJsiiProject({authorAddress:"elad.benisrael@gmail.com",authorName:"Elad Ben-Israel",name:"foobar",repository:"https://github.com/eladn/foobar.git",});project.synth();

This program instantiates the project type with minimal setup, and then callssynth() to synthesize the project files. By default, thenew command willalso execute this program, which will result in a fully working project.

Once your project is created, you can configure your project by editing.projenrc.js and re-runningnpx projen to synthesize again.

The files generated byprojen are considered an "implementation detail" andprojen protects them from being manually edited (most files are markedread-only, and an "anti tamper" check is configured in the CI build workflowto ensure that files are not updated during build).

For example, to setup PyPI publishing injsii projects, you can usepublishToPypi option:

constproject=newJsiiProject({// ...publishToPypi:{distName:"mydist",module:"my_module",}});

Run:

npx projen

And you'll notice that yourpackage.json file now contains apython section initsjsii config and the GitHubrelease.yml workflow includes a PyPIpublishing step.

We recommend to put this in your shell profile, so you can simply runpj everytime you update.projenrc.js:

alias pj='npx projen'

Most projects come with an assortment oftasks that handle variousdevelopment activities, from compiling to publishing. Tasks can be and composedtogether, and can be run as local commands or turned into GitHub workflows. Youcan list all tasks withnpx projen --help:

$ npx projen --helpprojen [command]Commands:  projen new [PROJECT-TYPE-NAME] [OPTIONS]  Creates a new projen project  projen clobber                            hard resets to HEAD of origin and cleans thelocal repo  projen compile                            Only compile  projentest                               Run tests  projen build                              Full release build (test+compile)  projen upgrade                            upgrade dependencies (including projen)...

Thebuild task is the same task that's executed in your CI builds. Ittypically compiles, lints, tests and packages your module for distribution.

Shell Completions

If installed as a global package,projen includes rich shell tab-completion support. To enable this in your shell, run:

# Bashprojen completion>>~/.bashrc# ZSHprojen completion>>~/.zshrc

Features

Some examples of features built-in to project types:

  • Fully synthesizepackage.json
  • Standard npm scripts likecompile,build,test,package
  • eslint
  • Jest
  • jsii: compile, package, api compatibility checks, API.md
  • Bump & release scripts with CHANGELOG generation based on conventional commits
  • Automated PR builds
  • Automated releases to npm, maven, NuGet and PyPI
  • Automated dependency upgrades
  • Mergify configuration
  • LICENSE file generation
  • gitignore + npmignore management
  • Node "engines" support with coupling to CI build environment and @types/node
  • Anti-tamper: CI builds will fail if a synthesized file is modified manually

Documentation

For documentation including examples and a full API reference, visithttps://projen.io/.

Ecosystem

projen takes a "batteries included" approach and aims to offer dozens of different project types out ofthe box (we are just getting started). Thinkprojen new react,projen new angular,projen new java-maven,projen new awscdk-typescript,projen new cdk8s-python (nothing in projen is tied to javascript or npm!)...

Adding new project types is as simple as submitting a pull request to this repo and exporting a class thatextendsprojen.Project (or one of its derivatives). Projen automatically discovers project types so yourtype will immediately be available inprojen new.

Projects in external modules

projen is bundled with many project types out of the box, but it can also workwith project types and components defined in external jsii modules (the reasonwe need jsii is because projen uses the jsii metadata to discover project types& options in projen new).

Say we have a module in npm calledprojen-vuejs which includes a single projecttype for vue.js:

$ npx projen new --from projen-vuejs

If the referenced module includes multiple project types, the type is required.Switches can also be used to specify initial values based on the project typeAPIs. You can also use any package syntax supported byyarnadd likeprojen-vuejs@1.2.3,file:/path/to/local/folder,git@github.com/awesome/projen-vuejs#1.2.3, etc.

$ npx projen new --from projen-vuejs@^2 vuejs-ts --description"my awesome vue project"

Under the hood,projen new will install theprojen-vuejs module from npm(version 2.0.0 and above), discover the project types in it and bootstrap thevuejs-ts project type. It will assign the value"my awesome vue project" tothedescription field. If you examine your.projenrc.js file, you'll seethatprojen-vuejs is defined as a dev dependency:

const{ VueJsProject}=require('projen-vuejs');constproject=newVueJsProject({name:'my-vuejs-sample',description:"my awesome vue project",// ...devDeps:['projen-vuejs']});project.synth();

Roadmap

SeeVision.

FAQ

Do I have to write my configuration in JavaScript?

Not at all! JavaScript is the default, but it's also possible to write it inJava, Python, TypeScript, or even JSON. This is madepossible by thejsii library which allows usto write APIs once and generate libraries in several languages. You can choosea different language by passing the--projenrc-ts,--projenrc-py,--projenrc-java, or--projenrc-json flags when runningprojen new.

Note: using a.projenrc.json file to specify configuration only allowsaccessing a subset of the entire API - the options which are passed to theconstructor of each project type.

How does projen work with my IDE?

projen has an unofficialVS Code extension. Check it out!

Community

The projen community can be found within the #projen channel in thecdk.devcommunity Slack workspace.

Virtual Meetup

  • Thursday June 30, 2022
  • 1-2pm America/New_York (EDT)
  • CFP a Google Form
  • CFP Closes Saturday April 30, 2022
  • Hosted onZoom

Contributions

Contributions of all kinds are welcome! Check out ourcontributor'sguide and ourcode of conduct.

For a quick start, check out a development environment:

$ git clone git@github.com:projen/projen$cd projen$ yarn$ yarn watch# compile in the background

Thanks goes to these wonderful people (emoji key):

All Contributors

 Aatman
Aatman

💻
Abdullah Sahin
Abdullah Sahin

💻
Adam
Adam

💻
Adam ElKhayyat
Adam ElKhayyat

💻
Adam Elmore
Adam Elmore

💻
Adrian Dimech
Adrian Dimech

💻
Adrian Mace
Adrian Mace

💻
Alejandro Lorefice
Alejandro Lorefice

💻
Alexander Forsyth
Alexander Forsyth

💻
Alexander Steppke
Alexander Steppke

💻
Amani Kilumanga
Amani Kilumanga

💻
Amin Fazl
Amin Fazl

💻
Amir Szekely
Amir Szekely

💻
Anderson Gomes
Anderson Gomes

💻
Andre de Camargo
Andre de Camargo

💻
Andrew Hammond
Andrew Hammond

💻
Andrew Kostka
Andrew Kostka

💻
Angelo Di Pilla
Angelo Di Pilla

💻
Ansgar Mertens
Ansgar Mertens

💻
Armando J. Ortiz Garcia
Armando J. Ortiz Garcia

💻
Arun Donti
Arun Donti

💻
Ash
Ash

💻
Austin
Austin

💻
Balagopal Kanattil
Balagopal Kanattil

💻
Bart Callant
Bart Callant

💻
Beau Bouchard
Beau Bouchard

💻
Ben Limmer
Ben Limmer

💻
Bilal Quadri
Bilal Quadri

💻
Boris Petersen
Boris Petersen

💻
Braden Mars
Braden Mars

💻
Brandon Miller
Brandon Miller

💻
Brian Leonard
Brian Leonard

💻
Calvin Combs
Calvin Combs

💻
Cameron Childress
Cameron Childress

💻
Campion Fellin
Campion Fellin

💻
Cao Peng
Cao Peng

💻
Carlos Tasada
Carlos Tasada

💻
Chris Bateman
Chris Bateman

💻
Chris Gatt
Chris Gatt

💻
Christopher Rybicki
Christopher Rybicki

💻
Cory Hall
Cory Hall

💻
Court Schuett
Court Schuett

💻
Craig Burdulis
Craig Burdulis

💻
Cristian Pallarés
Cristian Pallarés

💻
Daniel Schmidt
Daniel Schmidt

💻
Danny Steenman
Danny Steenman

💻
Derek Kershner
Derek Kershner

💻
Eduardo Rodrigues
Eduardo Rodrigues

💻
Elad Ben-Israel
Elad Ben-Israel

💻
Eli Polonsky
Eli Polonsky

💻
Eligio Mariño
Eligio Mariño

💻
Eric Tucker
Eric Tucker

💻
Eugene Cheung
Eugene Cheung

💻
Fons Biemans
Fons Biemans

💻
Francisco Robles Martín
Francisco Robles Martín

📖
Fynn Flügge
Fynn Flügge

💻
Gary Sassano
Gary Sassano

💻
Grady Barrett
Grady Barrett

💻
Greg Herlein
Greg Herlein

💻
Gregg
Gregg

💻
Hasan
Hasan

💻
Hassan Azhar
Hassan Azhar

💻
Hassan Mahmud
Hassan Mahmud

💻
Hassan Mahmud
Hassan Mahmud

💻
Heiko Rothe
Heiko Rothe

💻
Henri Yandell
Henri Yandell

💻
Henry Sachs
Henry Sachs

💻
Hoseung
Hoseung

💻
Ikko Ashimine
Ikko Ashimine

💻
Jack Leslie
Jack Leslie

💻
Jack Moseley
Jack Moseley

💻
Jack Stevenson
Jack Stevenson

💻
Jacob
Jacob

💻
Jake Pearson
Jake Pearson

💻
Jan Brauer
Jan Brauer

💻
Jeff Malins
Jeff Malins

💻
Jeremy Jonas
Jeremy Jonas

💻
Jesse Grabowski
Jesse Grabowski

💻
JoLo
JoLo

💻
Job de Noo
Job de Noo

💻
Jonathan Goldwasser
Jonathan Goldwasser

💻
Joost van der Waal
Joost van der Waal

💻
Jordan Sinko
Jordan Sinko

💻
Joseph Egan
Joseph Egan

💻
Josh Kellendonk
Josh Kellendonk

💻
Juho Majasaari
Juho Majasaari

💻
Juho Saarinen
Juho Saarinen

💻
Julian Michel
Julian Michel

💻
Kaizen Conroy
Kaizen Conroy

💻
Kenneth Winner
Kenneth Winner

💻
Kenneth Wußmann
Kenneth Wußmann

💻
Kenny Gatdula
Kenny Gatdula

💻
Konstantin Vyatkin
Konstantin Vyatkin

💻
Kraig Amador
Kraig Amador

💻
Kunal Dabir
Kunal Dabir

💻
Kyle Laker
Kyle Laker

💻
Lex Felix
Lex Felix

💻
Lex Felix
Lex Felix

💻
Liam Johnston
Liam Johnston

💻
Manuel
Manuel

💻
Marcio Cruz de Almeida
Marcio Cruz de Almeida

💻
Mark McCulloh
Mark McCulloh

💻
Mark McCulloh
Mark McCulloh

💻
Mark Nielsen
Mark Nielsen

💻
Markus Schuch
Markus Schuch

💻
Marnix Dessing
Marnix Dessing

💻
Martin Muller
Martin Muller

💻
Martin Zuber
Martin Zuber

💻
Masashi Tomooka
Masashi Tomooka

💻
Matt Gucci
Matt Gucci

💻
Matt Martz
Matt Martz

💻
Matt Wise
Matt Wise

💻
Matteo Sessa
Matteo Sessa

💻
Matthew Bonig
Matthew Bonig

💻
Matthew Gamble
Matthew Gamble

💻
Max Körlinge
Max Körlinge

💻
Mayur Mahrotri
Mayur Mahrotri

💻
Mayuresh Dharwadkar
Mayuresh Dharwadkar

💻
Mike
Mike

💻
Mitchell Valine
Mitchell Valine

💻
Momo Kornher
Momo Kornher

💻
Mukul Bansal
Mukul Bansal

💻
Neil Kuan
Neil Kuan

💻
Nick Keers
Nick Keers

💻
Nick Lynch
Nick Lynch

💻
Nicolas Byl
Nicolas Byl

💻
Nikhil Zadoo
Nikhil Zadoo

💻
Niko Virtala
Niko Virtala

💻
Niraj Palecha
Niraj Palecha

💻
Nurbanu
Nurbanu

💻
Pahud Hsieh
Pahud Hsieh

💻
Patrick
Patrick

💻
Patrick Aikens
Patrick Aikens

💻
Patrick Florek
Patrick Florek

💻
Patrick O'Connor
Patrick O'Connor

💻
Philip M. Gollucci
Philip M. Gollucci

💻
Philip White
Philip White

💻
Philipp Garbe
Philipp Garbe

💻
Rafal Wilinski
Rafal Wilinski

💻
Rami Husein
Rami Husein

💻
Rico Huijbers
Rico Huijbers

💻
Rob Giseburt
Rob Giseburt

💻
Robbie Mackay
Robbie Mackay

💻
Robert
Robert

💻
Rodrigo Farias Rezino
Rodrigo Farias Rezino

💻
Roger Chi
Roger Chi

💻
Romain Marcadier
Romain Marcadier

💻
Roman Vasilev
Roman Vasilev

💻
Ruben Pascal Abel
Ruben Pascal Abel

💻
Ryan Sonshine
Ryan Sonshine

💻
Ryosuke Iwanaga
Ryosuke Iwanaga

💻
Samuel Tschiedel
Samuel Tschiedel

💻
Saud Khanzada
Saud Khanzada

💻
Scott McFarlane
Scott McFarlane

💻
Scott Schreckengaust
Scott Schreckengaust

💻
Sebastian Korfmann
Sebastian Korfmann

💻
Shawn MacIntyre
Shawn MacIntyre

💻
Suhas Gaddam
Suhas Gaddam

💻
Thomas Klinger
Thomas Klinger

💻
Thorsten Hoeger
Thorsten Hoeger

💻
Tiara
Tiara

💻
Tobias
Tobias

💻
Tom Howard
Tom Howard

💻
Tom Keller
Tom Keller

💻
Tomasz Łakomy
Tomasz Łakomy

💻
Travis Martensen
Travis Martensen

💻
Victor Korzunin
Victor Korzunin

💻
VinayKokate22
VinayKokate22

💻
Vinayak Kukreja
Vinayak Kukreja

💻
Vlad Cos
Vlad Cos

💻
Will Dady
Will Dady

💻
Yigong Liu
Yigong Liu

💻
Yohta Kimura
Yohta Kimura

💻
Yuichi Kageyama
Yuichi Kageyama

💻
Yuval
Yuval

💻
andrestone
andrestone

💻
codeLeeek
codeLeeek

💻
flyingImer
flyingImer

💻
huaxk
huaxk

💻
john-tipper
john-tipper

💻
karlderkaefer
karlderkaefer

💻
kmkhr
kmkhr

💻
kt-hr
kt-hr

💻
lmarsden
lmarsden

💻
michaeltimbs
michaeltimbs

💻
orlandronen1
orlandronen1

💻
pvbouwel
pvbouwel

💻
suhussai
suhussai

💻
t0bst4r
t0bst4r

💻
tHyt-lab
tHyt-lab

💻
txxnano
txxnano

💻
vVahe
vVahe

💻
zetashift
zetashift

💻

License

Distributed under theApache-2.0 license.


[8]ページ先頭

©2009-2025 Movatter.jp