Socket
Socket
Sign inDemoInstall

my-website

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    my-website

Make your website with one import (and no deps)!


Version published
Weekly downloads
5
increased by400%
Maintainers
1
Install size
5.78 kB
Created
Weekly downloads
 

Readme

Source

my-website

Make your website as easy as 1 - 2 - 3.

  1. npm i -g parcel-bundler

index.html:

<script src="website.js"></script>

website.js:

import MyWebsite from 'my-website';
<MyWebsite />;

.babelrc:

{
  "presets": [
    ["@babel/preset-react", {
      "pragma": "MyWebsite.createElement"
    }]
  ],
}
  1. parcel run index.html

and you're done!

Features:

  • plug-and-play: no CSS or HTML needed
  • no dependencies‡

Advanced options

You can customize your website simply by passing in props:

import MyWebsite from 'my-website';
<MyWebsite animations={false} title="My Awesome Website" header="This website is more awesome" />;

Non-JSX Version

If you want to be even more lightweight, you can use this: 1.

website.js
import MyWebsite from 'my-website';

MyWebsite({
    title: "My super-lightweight website",
});

index.html

<script src="website.js"></script>

parcel index.html

inspired by https://twitter.com/wongmjane/status/1274713940505681921

‡ (other than something that can run jsx) ‡‡ (there is a non-jsx version)

Keywords

FAQs

Last updated on 21 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc