Code Monkey home page Code Monkey logo

union's People

Contributors

jamespatrickgibson avatar

Stargazers

 avatar  avatar

Watchers

 avatar

union's Issues

Setup NPM repo for project

  • Test build scripts
  • Test publishing to repo
  • Setup unpkg for easy includes
  • Setup a component example in Svelte REPL to test components work

npm distribution bug

Using the svelte quickstart, importing and using the union-design-system npm package the npm run dev command returns this error:

[!] Error: Could not load /Users/upstateinteractive/code/personal/website-/node_modules/union-design-system/src/index.js (imported by src/App.svelte): ENOENT: no such file or directory, open '/Users/upstateinteractive/code/personal/website-/node_modules/union-design-system/src/index.js'
<script>
  export let name;
  import {
    Button,
    FixedImage,
    Frame,
    Link,
    List,
    ListItem,
    Navigation,
    NavigationSection,
    MediaObject,
    Stack,
    SplitView,
    Text,
  } from "union-design-system";
</script>

<style>
  main {
    text-align: center;
    padding: 1em;
    max-width: 240px;
    margin: 0 auto;
  }

  h1 {
    color: #ff3e00;
    text-transform: uppercase;
    font-size: 4em;
    font-weight: 100;
  }

  @media (min-width: 640px) {
    main {
      max-width: none;
    }
  }
</style>

<Navigation>
  <NavigationSection title="Apple Music">
    <List>
      <ListItem>
        <Text size="3">
          <Link to="./" type="implied">For You</Link>
        </Text>
      </ListItem>
      <ListItem>
        <Text size="3">
          <Link to="./" type="implied">Browse</Link>
        </Text>
      </ListItem>
      <ListItem>
        <Text size="3">
          <Link to="./" type="implied">Radio</Link>
        </Text>
      </ListItem>
    </List>
  </NavigationSection>
</Navigation>

<main>
  <h1>Hello {name}!</h1>
  <p>
    Visit the
    <a href="https://svelte.dev/tutorial">Svelte tutorial</a>
    to learn how to build Svelte apps.
  </p>
</main>

Example

Getting started

I compiled snippets of source from three places:

  • storybook's preview component
  • the svelte-docs source code
  • angular documentation's example-viewer

the lightly annotated code is here.

Notes

...the angular example-viewer is a tightly-coupled system. Angular docs use a pre-processor, i haven't located that source code, that uses a method similar to svelte-docs for processing markdown.
...the example-viewer can only show examples from a source that is in an angular namespace @angular/component-examples that makes it possible to define an example to display based on a predefined string key. the inline usage in a markdown file looks like:

<!-- example(cdk-drag-drop-overview) -->

...the svelte markdown preprocessor that is a part of the svelte-docs project is a small amount of code.

...the react project couples the style. it is the only project whose props allow for style to be passed in using a className prop. as well, it shares with the angular example-viewer an expandable/collapsible prop.

Docs: Getting Started

Current:

### Add Theme and Core CSS

<link rel="stylesheet" href="https://unpkg.com/union-design-system/dist/theme.css"/>
<link rel="stylesheet" href="https://unpkg.com/union-design-system/dist/union.css"/>

I'm putting this into a sapper project, guessing that "template.html" is the way to do it.

I could use guidance on the place to put these files.

<Navigation> fails in sapper

error:

<Navigation> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.