{"id":13480110,"url":"https://github.com/eanplatter/enclave","last_synced_at":"2025-03-27T10:31:03.503Z","repository":{"id":57225110,"uuid":"53015094","full_name":"eanplatter/enclave","owner":"eanplatter","description":"A simpler way to compile React applications http://enclave.js.org","archived":true,"fork":false,"pushed_at":"2019-01-20T17:50:57.000Z","size":196,"stargazers_count":756,"open_issues_count":1,"forks_count":31,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-14T23:41:19.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eanplatter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-03T02:49:06.000Z","updated_at":"2024-02-12T23:53:59.000Z","dependencies_parsed_at":"2022-08-24T11:01:09.903Z","dependency_job_id":null,"html_url":"https://github.com/eanplatter/enclave","commit_stats":null,"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eanplatter%2Fenclave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eanplatter%2Fenclave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eanplatter%2Fenclave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eanplatter%2Fenclave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eanplatter","download_url":"https://codeload.github.com/eanplatter/enclave/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245826784,"owners_count":20678854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:34.729Z","updated_at":"2025-03-27T10:31:03.202Z","avatar_url":"https://github.com/eanplatter.png","language":"JavaScript","readme":"_NOTICE: I'm not actively working on new features for enclave. You should check out the official CLI tool for react: [create-react-app](https://github.com/facebookincubator/create-react-app)_. If you are still using enclave and want to make an issue or PR I am happy to respond and make updates :)\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"enclave\" src=\"http://i1264.photobucket.com/albums/jj488/eanplatter1/enclave-logo_zpslmhskufg.png\" width=\"546\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A simpler way to compile React applications.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href='https://www.npmjs.org/package/enclave'\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/enclave.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href='http://npm-stat.com/charts.html?package=enclave\u0026from=2016-03-01'\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/enclave.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href='./LICENSE.md'\u003e\n    \u003cimg src=\"http://img.shields.io/:license-mit-blue.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href='https://travis-ci.org/eanplatter/enclave'\u003e\n    \u003cimg src=\"https://travis-ci.org/eanplatter/enclave.svg?branch=master\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## What is this?\nAn npm module which handles compiling your JSX and ES2015 code into browser-ready JavaScript.\n\n## Why do I want this?\nIf you've ever had to make a React app from scratch, you know it can be rough to set up. Enclave removes the set up so you can focus on what's important, building your app.\n\n## Who is this for?\nPrimarily for those who don't want to go through the hassle of setting up a React project but who still want to flexibility that a starter kit can't provide.\n\n## Ok, but what if my app outgrows enclave?\nIf you find for whatever reason that enclave's management of your webpack and babel dependencies is not offering enough customization for you, merely run:\n```\n$ npm run enclave-eject\n```\n\nThe `enclave-eject` command transfers enclave's webpack configuration files to your app's root, and installs the dependencies you need in your app for you.\n\nAfter executing the eject command, `$ npm run serve` will compile and serve your code, just like before, sans enclave.\n\n\n## Philosophy\nThis project comes from a combination of two things, a complexity of configuring React applications with Webpack and Babel (especially for beginners), and my experience with compile-to-JavaScript languages, like Elm or CoffeeScript.\n\nI thought it would be nice to be able to write JSX and ES* the same way I wrote Elm. Just do it, and let some magic happen behind the scenes to make it browser compatible.\n\nEnclave was created with this approach in mind.\n\nWhat I would like to do is eventually level enclave to the point where it maintains a sane API but is less reliant on Webpack, maybe even have it do the compiling as well.\n\nAll in all, this is open experimentation. Hopefully if you're wanting to get started with React you'll find Enclave is a helpful tool to get you up and running quickly.\n\n## Getting Started:\n### Short Version:\n```\n$ npm i enclave -S\n$ npm run enclave-serve\n```\n\n### Long version\n```\n$ mkdir my-new-app\n$ cd my-new-app\n$ npm init\n$ npm install enclave --save\n```\n\nEnclave will then take you through a series of prompts. The answers to these prompts will create a `enclave.js` file in your application's root. This file is what enclave uses to reference your build. If you need to change any of your settings, you can do that directly in the `enclave.js` file.\n\nCreate an entry point for your application:\n```\n$ mkdir src \u0026\u0026 touch src/App.js src/index.html\n```\nNow you'll be able to write some crazy JSX and ES2015 code like this:\n``` js\n/* src/App.js */\n\nimport React from 'react';\nimport { render } from 'react-dom';\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003ch1\u003e\n          Welcome to my app!\n        \u003c/h1\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nrender(\u003cApp /\u003e, document.getElementById('root'));\n```\n\nConfigure your `index.html` file to have something with the id your react app is looking to hook into (\"root\" in this case)\n``` html\n\u003c!-- src/index.html --\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003ctitle\u003emy app\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv id='root'\u003e\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\u003e _Also, this is where you would do things like hook in a cdn or google fonts or whatevs._\n\nEnclave will _automagically_ add a script to your `package.json` file which will allow you to run everything.\nTo run it, type the following in your terminal:\n```\n$ npm run enclave-serve\n```\n\u003e _If you want to edit your scripts, you can just move the start command somewhere else._\n\nThen find your app at `http://localhost:8080`\n\u003e _If you set your port to something other than 8080, then go there instead!_.\n\n## Currently supported settings\n\nWhen enclave is installed in your project, it creates an `enclave.js` file. This is where your settings are stored. Currently supported settings are:\n  - entry: {string} The relative path of your entry file, it tells Webpack where to start compiling. Ex. \"src/App.js\"\n  - output: {string} The relative path and name of the directory you want Webpack to spit your compiled code into. Ex. \"dist\"\n  - port: {number} The port where you want your app to run. Ex. 3000\n  - index: {string} The relative path of your `index.html` file. Ex. \"src/index.html\"\n  - live: {boolean} Whether you want live-reload or not. Takes in \"t\", \"f\", \"true\", or \"false\"\n\nAfter your complete enclave's prompts, you'll find a `enclave.js` file in your app. If you need to edit any of the answers you gave you can do that here. It should look something like this:\n\n```js\n/* enclave.js */\nexports.entry = \"src/App.js\"\nexports.output = \"dist\"\nexports.port = 3000\nexports.index = \"src/index.html\"\nexports.live = true\n```\n\n## Contributing\n\n[See the Contributing Guide](./CONTRIBUTING.md)\n\n[Learn how Enclave works](./WALKTHROUGH.md)\n\n## License\n\n[MIT](./LICENSE.md)\n","funding_links":[],"categories":["Alternatives","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feanplatter%2Fenclave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feanplatter%2Fenclave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feanplatter%2Fenclave/lists"}